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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If movie is loaded, dont reload it script??

Status
Not open for further replies.

chartmakers

Technical User
Dec 7, 2003
16
US


Hey guys. I have a movie with 2 buttons. Each button will load a separate movie on top of level0. But if you click button 1, or button 2, and its movie is already loaded, it reloads it (obviously) what can i use to have it check to see if the movie is already loaded, so it wont reload it again??

Thanks all!
 
Sure it reloads it, but what's the problem with that? Since after normally downloading on the initial press, the movie is now cached, it should show up immediately on a second press.
Don't you want it to be "re-loaded" again if the button is pressed a second or whatever time?
 
I havn't found a better way to do this than to just set a variable when you load a movie. When the time comes to load the movie only if it isn't currently loaded, you can check the state of the variable.

Of course wherever the movie could get unloaded, you would have to change the variable's state here too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top