PDA

View Full Version : LoadMovie()



Lews
September 21st, 2003, 11:50 AM
I have a question and a problem with LoadMovie:

Question: When you use LoadMovie to load a SWF, does that SWF stay loaded, or does it get reloaded every subsequent time you use the LoadMovie function for that same SWF?

Problem: I use the LoadMovie function in several buttons to load SWFs into my movie. In those same buttons, I use a function which fades a different (already present) movieclip in.
However, the LoadMovie call seems to block out the movie clip which needs to fade in; when I click the button, it loads the SWF just fine, the movieclip just doesn't fade in (or it does, but I can't see it), when I comment the LoadMovie call out, the movieclip fades in just fine (and I can see it).
Also, I load the SWFs into an empty movieclip, which is beneath all other layers, so that's not the problem.

My code:

In my button:



on(release){
_root.home.fade(0,100,10);
_root.content.loadMovie("home.swf");
}


I've tried:


on(release){
_root.content.loadMovie("home.swf");
_root.content.swapDepths(1000);
_root.home.fade(0,100,10);
}


But, that doesn't get me anywhere, either.

Lews
September 21st, 2003, 01:43 PM
Hmm, problem solved by a reboot ;)
(Questions still stands, though)

Digitalosophy
September 21st, 2003, 02:26 PM
it would get reloaded, to work around that you can do this:
(this might not be what your looking for, but maybe yu can build off this)



aboutLoaded = false;
about.onRelease = function(){
if(aboutLoaded != true){
loadMovie("about.swf",2);
aboutLoaded = true;
}


that pretty much tells flash not to load about.swf if it's already loaded.

i didn't fully understand your problem, maybe you can implimen this

Lews
September 21st, 2003, 03:55 PM
I'll look into that, thanks. =)

Digitalosophy
September 21st, 2003, 06:14 PM
np