• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Waiting for a movieClip to finish

Hi there.

--- THE STATUS ---
I've build a flash app with two main modules:
- First is the front-end. It just includes backgrounds, buttons and an empty movieClip to load whatever to be displayed.
- Then there are n tiny SWFs that will be loaded dinamically when the user clicks on the front-end buttons.

Each one of these tiny SWF includes a transition effect before displayed (unrolling), then show the contents (and stop), and a rolling effect to do before unloading.

--- THE CODE ---
this["button" + i].onRelease = function () {
  content.gotoAndPlay(3);  // starts the ending animation
  loadMovie("new-movie-to-load.swf", content);
// Tip: content is just an empty mc used to load all the SWFs to be shown.

The rolling effect is never show, because of (i guess) it's unloaded before ending the execution. How can i wait for the SWF movie to finish before unloading it?
1 Solution
check for the last frame of that mc, or put the call to unload the next mc in the loaded swf.

With the second option - not sure how unloading works from a loaded swf, so you can do this - on last frame of the loaded swf, put this:


then check for that in your code:


with first option,  put this in your code

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.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now