?
Solved

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

Posted on 2006-07-24
1
Medium Priority
?
275 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 2000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses
Course of the Month12 days, 20 hours left to enroll

777 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