PDA

View Full Version : How to Load an Swf File into a movie clip and then Unload


joshdesign
04-07-2011, 02:43 AM
Hi im trying to load an Swf file into a movie clip and then when you click on a button it has to go to another page.

i wrote the code and it works perfectly , when i click the button it goes to the other page ... put the problem is that the Swf video ( with sound) . is still playing .. i can tell that because the sound is playing... Can you guys help me.. .....

another thing if it possible to help me also to make a code that says .. when the video is over go to the other page...


Mycode............................................ ...........................



stop();


var swfLoader:Loader = new Loader();
video.addChild(swfLoader);
var bgURL:URLRequest = new URLRequest("Child.swf");
swfLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, loadProdComplete);
swfLoader.load(bgURL);
function loadProdComplete(e:Event) {

}


home.addEventListener(MouseEvent.CLICK, homeclick);

function homeclick(evtobj:MouseEvent):void{

gotoAndStop(evtobj.target.name);

}



End OF Code.............................................. .............................