Hi,
I'm developing a project. I have kept an intro video and using the below code to stop everything from the stage and go to next swf.
loader.unloadAndStop();
In this case, It stops everything including the sound of the video. It starts playing the 2nd swf but the last frame of video stays on the stage while it starts playing 2nd swf.
I can hear the audio of the 2nd swf but on the stage last frame of the flv video. How to remove flv completely from the stage?
Any help would be appreciated.
Thanks.
Hi,
Thanks for your reply.
I have loaded flv onto the stage using FLVPlayback component without any skin. I'll narrate it with sample file names.
demo1.swf is having below code.
fscommand("fullscreen", "true");
import flash.events.Event;
var loader:Loader = new Loader();
addChild(loader);
function loadF(fileS:String):void {
if(loader.content){
loader.unloadAndStop();
}
loader.load(new URLRequest(fileS));
addChild(loader);
}
function unloadF():void{
if(loader.content){
loader.unloadAndStop();
}
}
loadF("demo2.swf");
---------------------------------------------------------------------- ----------------
demo2.swf is having the flv kept on the timeline using FLVPlayback component.
At the end of the video around after 14 secs I have kept actionscript saying that
MovieClip(this.parent.parent).loadF("demo3.swf");
---------------------------------------------------------------------- ----------------
It loads demo3.swf without getting unloaded by itself from the stage. The Audio gets stopped but last frame of flv video is still there.
I can hear the audio of demo3.swf but unable to see.
This is the issue going on. Hope you can get a picture out of this.
Awaiting your reply.
Thanks.
When I build a set of files using what you described the code works properly... when the flv is done it triggers a function which executes the command to load demo3 and the demo2 file is unloaded before the demo3 file loads. Maybe you should rebuild using what you just described to test and then compare how it differs from what you actually implemented.
You should place traces in your functions to see if your conditionals and other code are executing as expected.
The way you have it, demo2 is dependent on demo1 existing - files should be able to stand on their own so that they are more portable. The more proper way of doing this is to just have demo2 dispatch an event when the flv completes. Have demo1 assign an event listener for that event when demo2 is finished being loaded. Let demo1 catch the event and deal with unloading demo2.
North America
Europe, Middle East and Africa
Asia Pacific