Hey All,
I am near completing a basic website in AS3.0. I Have a portfolio section which loads in external swf’s which contain a video with the FLV Playback Component.
This is how I add the swf after it preloads:
function craDone(e:Event):void {
trace("LOAD");
TweenLite.to (portfolioBucket_mc, 0.5, {x:-831, alpha:0, ease:Back.easeIn});
var undergroundLoaded = emptyMovieClip_mc.addChild(loadUnderground);
back_btn.visible = true;
TweenLite.to(back_mc, 0.5, {delay:1.5, alpha:1});
}
The Portfolio bucket tweens off the stage after the preload and then SWF is added and my back button ( which will return you the the portfolio bucket ) appears. ALL IS GOOD!
Then comes the code for the back button:
back_btn.addEventListener(MouseEvent.MOUSE_OVER, hoverBack);
back_btn.addEventListener(MouseEvent.MOUSE_OUT, outBack);
back_btn.addEventListener(MouseEvent.MOUSE_DOWN, clickBack);
function hoverBack(evtObj:MouseEvent)
{
trace ("about to go back");
}
function outBack(evtObj:MouseEvent)
{
trace("not going back anymore");
}
function clickBack(evtObj:MouseEvent)
{
emptyMovieClip_mc.removeChildAt(0);
emptyMovieClip_mc.my_FLVPlybk.stop();
}
The Problem here is the movie still keeps playing and nothing I have tried has been able to stop it. I was hoping to be able to continually addSWF’s and removeSWF’s out of my emptyMovieClip_mc.
I read about the new .unloadAndStop function for Flash Player 10. Tried it and it still nothing. I wrote it like this, maybe it’s wrong?
emptyMovieClip_mc.my_FLVPlybk.unloadAndStop();
PLEASE help… Thanks again.