ボタンをクリックすると、Flash アプリケーションから抜け出します。私が欲しいのは、彼の声の音をクリックしたときです。完了後、フラッシュアプリケーションを終了します。
これは私のコードです
Exit.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);
function fl_MouseClickHandler_4(event:MouseEvent):void
{
var button:button1 = new button1();
var myChannel:SoundChannel = button.play();
if (myChannel !=null)
{
fscommand("quit");
}
}
これらのコードで何をすべきか
ええ、私はすでにこれを取得しています。これは機能する私のコードです
import flash.events.MouseEvent;
import flash.media.Sound;
function fl_MouseClickHandler_4(event:MouseEvent):void
{
var button:button2 = new button2();
var myChannel1:SoundChannel = button.play();
myChannel1.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
}
function onPlaybackComplete(event:Event)
{
fscommand("quit");
}