note ไว้กันลืม
function skipHandler(event:MouseEvent):void {
video.pause();
trace ("video paused");
removeChild(video);
trace ("video removed");
event.target.root.mcContainer.mcIntro.unload();
trace ("mcIntro Unloaded");
event.target.root.mcContainer.mcMenu.source = "mcMainMenu";
event.target.root.mcContainer.mcLarge.source = "mcBlankLg";
trace ("Menu and Main Loaded");
event.target.root.mcContainer.mcPlayers.moveBryzTallOver();
trace ("Players Moved");
}
import fl.video.*;
trace(FLVPlayback.VERSION);
video.addEventListener(VideoEvent.COMPLETE, endHandler);
function endHandler(event:VideoEvent):void {
//video.pause();
//trace ("video paused");
removeChild(video);
trace ("video removed");
event.target.root.mcContainer.mcIntro.unload();
trace ("mcIntro Unloaded");
event.target.root.mcContainer.mcMenu.source = "mcMainMenu";
event.target.root.mcContainer.mcLarge.source = "mcBlankLg";
trace ("Menu and Main Loaded");
event.target.root.mcContainer.mcPlayers.moveBryzTallOver();
trace ("Player Moved");
}
ให้สังเกตที่ removeChild() แล้วตามด้วย instance ที่เราสร้างขึ้นมา
note from SCGCD Projectแท็ก Technorati FLVPlayback component, Flash, Flash CS4, Flash Scripts
function skipHandler(event:MouseEvent):void {
video.pause();
trace ("video paused");
removeChild(video);
trace ("video removed");
event.target.root.mcContainer.mcIntro.unload();
trace ("mcIntro Unloaded");
event.target.root.mcContainer.mcMenu.source = "mcMainMenu";
event.target.root.mcContainer.mcLarge.source = "mcBlankLg";
trace ("Menu and Main Loaded");
event.target.root.mcContainer.mcPlayers.moveBryzTallOver();
trace ("Players Moved");
}
import fl.video.*;
trace(FLVPlayback.VERSION);
video.addEventListener(VideoEvent.COMPLETE, endHandler);
function endHandler(event:VideoEvent):void {
//video.pause();
//trace ("video paused");
removeChild(video);
trace ("video removed");
event.target.root.mcContainer.mcIntro.unload();
trace ("mcIntro Unloaded");
event.target.root.mcContainer.mcMenu.source = "mcMainMenu";
event.target.root.mcContainer.mcLarge.source = "mcBlankLg";
trace ("Menu and Main Loaded");
event.target.root.mcContainer.mcPlayers.moveBryzTallOver();
trace ("Player Moved");
}
ให้สังเกตที่ removeChild() แล้วตามด้วย instance ที่เราสร้างขึ้นมา
note from SCGCD Projectแท็ก Technorati FLVPlayback component, Flash, Flash CS4, Flash Scripts
ไม่มีความคิดเห็น:
แสดงความคิดเห็น