Hi All
I’ve only been using actionscript 3 for about 2 weeks, so my lack of understanding is really showing.
I’m trying to use events to get an external SWF to load when another external SWF with flv content finishes playing.
This is my first experience with events so I’ve probably approached it from completely the wrong angle.
Any help would be appreciated…
Here is the code from the main file:
var Xpos:Number=110;
var Ypos:Number=110;
var swf_MC:MovieClip = new MovieClip();
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("arch_reel.swf");
addChild (swf_MC);
swf_MC.x=Xpos
swf_MC.y=Ypos
loader.load(defaultSWF);
swf_MC.addChild(loader);
//Btns Universal Function
function btnClick(event:MouseEvent):void{
SoundMixer.stopAll();
swf_MC.removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest("motion.swf");
loader.load(newSWFRequest);
swf_MC.addChild(loader);
}
function returnSWF(event:Event):void{
swf_MC.removeChild(loader);
loader.load(defaultSWF);
swf_MC.addChild(loader);
}
//Btn Listeners
motion.addEventListener(MouseEvent.CLICK,btnClick);
swf_MC.addEventListener(swf_MC.motionClip.Event.COMPLETE,swf_MC.motionClip.eventClip, returnSWF);
And from the external file:
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
motionClip.playPauseButton = player;
motionClip.seekBar = seeker;
motionClip.addEventListener(VideoEvent.COMPLETE, goNext);
function goNext(e:VideoEvent):void {
nextFrame();
}
stop();
function eventClip (e:Event):void{
}