FORUMS: list search recent posts

CS4 AS3 how can I load and unload swf w/ flv w/out stacking?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hoss Sarbaz
CS4 AS3 how can I load and unload swf w/ flv w/out stacking?
on Nov 21, 2009 at 4:56:25 am

I want to load and unload EXTERNAL SWF that contains FLV on mouse click. Loading and unloading the swf is NOT the issue. The problem is how do i get the external swf which contains an flv to stop playing and stacking up on each other.

Please please help!

I can load and unload the swf's as long as I pause the videos before I click on another thumbnail, but if I click on another thumbnail while the external swf is playing it's flv, the previous flv keeps playing and stack up under the newly loaded swf.

The audio and video keep stacking up! Craziness!




here is the code I have:

//---start code ----//
stop();


// Container
var imageLoader:Loader = new Loader();

// Url Requests
var imageRequest:URLRequest = new URLRequest("pepsi_vid1.swf");
var imageRequest_2:URLRequest = new URLRequest("pepsi_vid2.swf");



// Intial Page Loaded
imageLoader.load(imageRequest);
addChild(imageLoader);

// Button Functions
function goHome1 (e:MouseEvent):void{

imageLoader.load(imageRequest);
addChild(imageLoader);
}


// Button Functions
function goHome2 (e:MouseEvent):void{

imageLoader.load(imageRequest_2);
addChild(imageLoader);
}

thumb1_btn.addEventListener(MouseEvent.CLICK, goHome1);
thumb2_btn.addEventListener(MouseEvent.CLICK, goHome2);



//----stop code ----//

Thanks!

Hoss


Return to posts index

Mike Smith
Re: CS4 AS3 how can I load and unload swf w/ flv w/out stacking?
on Nov 21, 2009 at 10:23:29 am

Why do you need to load external swfs? Why not create one netstream, and change the video attached to ir on click?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]