Control timeline of a child created by loadMovie

Posted on 2006-03-29
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);

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


But it's not. It shouldn't make a difference that the .swf was created using Captivate, should it?
Question by:juststeve
    LVL 34

    Accepted Solution

    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:
    this.onEnterFrame = function()
          if (myChildHolder._framesloaded>1)
                delete this.onEnterFrame;

    LVL 34

    Expert Comment

    by:Aneesh Chopra
    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...


    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    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. …
    Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    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.

    759 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

    7 Experts available now in Live!

    Get 1:1 Help Now