Solved

Check if frameloaded in another swf that's being called into an empty clip

Posted on 2006-07-24
1
267 Views
Last Modified: 2012-06-27
Hi

I'd like to delay a gotoandPlay action on my main timeline till another swf has loaded into an empty movie clip that's onstage.

Is that possible?

Thanks
Aidan
0
Comment
Question by:aidan09
1 Comment
 
LVL 3

Accepted Solution

by:
antorio earned 500 total points
ID: 17170902
Sure,
Use MovieClipLoader for this.
example:
------------------
stop()  // <--stopping the main timeline first

var myLoader = new MovieClipLoader();
var mylistener = new Object();
//
mylistener.onLoadProgress = function(target:MovieClip, bytesLoaded, bytesTotal) {            
   var getcent = bytesLoaded/bytesTotal;
   if (bytesLoaded == bytesTotal) {
          // this is where you want to put the next action after the swf is fully loaded
        _root.gotoAndPlay("YourNextTargetFrameHere");
   };
//
myLoader.addListener(mylistener);
myLoader.loadClip("YourAnotherSwf.swf", YourEmptyMovieClip);
------------------

See that "onLoadProgress" ? you could use another like "onLoadInit" or "onLoadComplete".
Read the MovieClipLoader chapter in Flash help file. That should solve your question :)

cheers,
antorio
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question