Solved

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

Posted on 2006-07-24
1
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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 live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.

705 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