Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why use unloadMovie?

Status
Not open for further replies.

lumstar

Technical User
Jan 29, 2002
177
CA
Hey Guys,

Im just a little curious why you would want to use the unloadMovie command? What does it do for you? By unloading the swf, doesnt that mean that to view it again, it has to be re-loaded?

Please explain the advantages/disadvantages.

Thanks in advance! ______________________________________
Keep On Coding!!
If my post helped you, please give me a star.
If your post helps me, I'll give you one!

Lumstar
 
I never use it myself. I make movies invisible if I want to "unload" them. One advantage that I can think of is that it'll save some of a user's RAM. Other than that I don't really know. Using unload will indeed make the user have to reload the swf so in most cases I'm not sure why you'd want to do that.

If you are using a lot of large swfs it could bog down a computer, but you'd really need some beefy swfs.
 
Thanks for that.
How exactly do you make them invisible?
What I have is a movie on which the first frame is the main navigation, and the second, third..... all have swf's which load upon frameload. What I cannot seem to do is return to the main menu (frame 1). What actionscript should I put on the Main Menu button, assuming they are in the same scene.


Regards, Lumstar

______________________________________
Keep On Coding!!
If my post helped you, please give me a star.
If your post helps me, I'll give you one!
scifi-alien-with-red-boots-DW.gif
 
To turn visibility on & 0ff of movies, simply use the _visible property:

_level5._visible = false;
_level5._visible = true;

_root.targetMC._visible = false;
_root.targetMC._visible = true;

Try this for your button:

_level0.gotoAndStop(1);

Or label your first frame, and target that label:

_level0.gotoAndStop("label");
Regards,

new.gif
 
Does using the _visible = false make any buttons you may have in that level inactive too?
funkymonk2.jpg


rod@sameplanet.co.uk
********************
 
unloadMovie doesn't just unload .swfs it also unloads movieclips so if you have a clip on stage that can be dispensed with after a while (maybe it's a target in an arcade game that's been hit and is no longer needed) unloadMovie is one way to get rid of it. Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top