I want to be able to use a button to load a swf into a movie clip, and then wen the button is pressed again to be able to tell if the swf has been loaded into the mc.

I have about 10 buttons on the main page. Each button takes you to a specific frame in the timeline, plays an animation and then stops at a frame that loads a specific external swf into a specific MC using loadMovie. Now when that person leaves the loaded external swf and returns back to the main page, if he clicks the button again he will end up loading the entire external swf AGAIN, even though he already did that during his session.

This is very frustrating for the end user b/c it takes a very long time to navigate.
Is there a way to avoid this situation, for example to write some AS (either in the main movie or on the external swf), that checks if the external swf has been loaded already, and if it has, not to load it again?

Thank you
Who is Participating?
Ramy_atefConnect With a Mentor Commented:
the loaded movie should not take long time in the second time as it should be loaded from the cache
however , you can load the external movie once at the begining of the main movie and make it invisible , when a button is calling it , you just make it visible and make it go to the specific frame, something like that


and so on..

then you will load the external movie once and no need to load it each time a button is pressed..

Lunar76Author Commented:
Thanks for the help Ramy, but if I load all the external swfs in the beginning (which Ive already done before, and is why I am doing it this way) it will take way too long. The load time will be extremely long, and if the user wanted to enter a specific section and it hasnt completely loaded yet it causes alot of problems.

Thanks anyway,
Well, you can make a preloader or better to divide that loaded moive into smaller swf (one for each button) that way you will minimize the downlaod time as the user will only load the moives he wanted ..

Lunar76Author Commented:
Thats exactly what I am doing, but everytime I click on the button which has a loadMovie function, it loads the movie all over again and the user waits for it to load all over again. Just like I stated in my original question on top.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.