Solved

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

Posted on 2006-07-24
1
258 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

803 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