[LEFT]Please take a look at this…
Everything is on single frame…
I want it to unload the active clip first, then load button content.
Here is what happens…
Intro loads…
Click on Bio, Bio loads THEN Intro unloads. (sometimes)
Occasionally you have to click several times to get it to unload.
Same with all buttons.[/LEFT]
[LEFT]I see this in debug mode as well.
Here is the code:[/LEFT]
[LEFT]stop();
//generic easing stuff here
import fl.transitions.Tween;
import fl.transitions.easing.*;[/LEFT]
[LEFT]// Stuff to load swf files
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);
var thisMC:MovieClip = new MovieClip();
stage.addChild(thisMC);// Add empty MC initially so the nextClip function can be generic
//Load Intro MC
thisLoader.load(new URLRequest("./mcClips/intro.swf"));
// Tell AS that the loaded file is a movie clip and add it to the stage.
function doneLoading(e:Event):void {
stage.removeChild(thisMC);
thisMC = MovieClip(thisLoader.content);
thisLoader.unload();
stage.addChild(thisMC);
thisMC.x = 0;
thisMC.y = 0;
thisMC.play();
}
// control buttons MCs here...
btnBio.addEventListener(MouseEvent.CLICK, play1);
function play1(e:MouseEvent):void {
thisLoader.load(new URLRequest("./mcClips/bio.swf"));[/LEFT]
[LEFT]}
btnPhotos.addEventListener(MouseEvent.CLICK, play2);
function play2(e:MouseEvent):void {
thisLoader.load(new URLRequest("photos.swf"));
}
btnContact.addEventListener(MouseEvent.CLICK, play3);
function play3(e:MouseEvent):void {
thisLoader.load(new URLRequest("./mcClips/contact.swf"));
}
btnIntro.addEventListener(MouseEvent.CLICK, play4);
function play4(e:MouseEvent):void {
thisLoader.load(new URLRequest("./mcClips/intro.swf"));
}
btnVideo.addEventListener(MouseEvent.CLICK, play5);
function play5(e:MouseEvent):void {
thisLoader.load(new URLRequest("JT.swf"));
}[/LEFT]
[LEFT]Also, JT.swf contains FLV…
That as well does not unload properly, and clicking on it again after loading creates multiple instances.
How do I unload properly??
Please help us here if you can.
Thanks
-SlimP:hr:[/LEFT]