Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
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 how to record live broadcast.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now