We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Control timeline of a child created by loadMovie

juststeve
juststeve asked
on
Medium Priority
359 Views
Last Modified: 2008-02-01
My main timeline has a clip (myChildHolder) that will load an external .swf where I need to be able to stop/start it according to conditions of the parent.

The first/only frame of myChildholder is:
loadMovie("myChild.swf", this);
stop();

Because I'm loading into 'this' I expect the parent (_root) to be able to control the movie with:

myChildHolder.stop();

But it's not. It shouldn't make a difference that the .swf was created using Captivate, should it?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2008
Commented:
problem is every external resource takes time to gets loaded..
if you do the "loadMovie" and "stop" on same frame it will not take the "stop"..

You should do the "loadMovie" then check for the loading initailization and as first frame get loaded then do "stop"

here is the example:

put the following code on first frame it will do the all for you:
----------
myChildHolder.loadMovie("myChild.swf");
this.onEnterFrame = function()
{
      if (myChildHolder._framesloaded>1)
      {
            myChildHolder.stop();
            delete this.onEnterFrame;
      }
};
-----------



Rgds
Aneesh

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
CERTIFIED EXPERT
Top Expert 2008

Commented:
To avoid the confusion...

you should paste the above mention code on the first frame of root.....
and remove the code on the first frame of "myChildholder"

I hope all would be clear...

Rgds
Aneesh

Author

Commented:
Perfect....Thankx.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.