Control timeline of a child created by loadMovie

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?
juststeveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh ChopraCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aneesh ChopraCommented:
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
0
juststeveAuthor Commented:
Perfect....Thankx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.