Another pause MC problem :(

  • Hello all,

    Sorry for asking about this yet again, but I did do a search and after going through 6 pages of posts i still can't get a .swf to pause. I am a noob so I prolly missed something simple.
    On the main stage I have a layer that has an empty movieclip in it called "empty_MC", which is the container. On another layer I have the action script with this code:

    empty_MC.loadMovie("fg.swf");

    That all works well, the movie "fg.swf" loads up into the container "empty_MC" and plays fine.
    I then have a button on the main stage called "PauseBtn" with the code:

    on (release) {
    _root.empty_MC.stop();
    }

    I have also tried other forms of the path like : _root.empty_MC.fg.swf.stop() but I just can't seem to get it right. Nothing has worked so far, fg.swf just continues to play through. Any help would be much appreciated.

    Thank you :)


  • lol I was hoping you weren't going to say that :)

    thx again for your help.


  • thx for the quick response :)
    The movie fg.swf is playing inside the moviclip empty_MC. There will be several diferent .swf being played in that emp movieclip at different periods, one at a time.

    heh, I hope I understood your question correctly :)

    thx again


  • thx so much for the help. I guess I'll look for some tutorials on the proper way to name everything.

    thx again :)


  • I now have everything named properly, but as was stated it doesn't stop all the moviclips inside the swf to stop. Does that mean I have to add the same stop code for every movieclip inside the the swf file?


  • Its not stopping because the animation inside fg.swf is not on the main timeline. Calling _root.empty_MC.stop() only stops the main timeline on fg.swf to stop. This does no stop all sub movieclips to stop.

    You need to tell each clip individually that they need to stop. IE
    _root.empty_MC.someClip.stop(). In this case it looks like you didnt even name the instance of the animating clip. If you need a quick and dirty way of stopping all the clips on the main timeline without naming them all, you can do something like this:

    on (release) {
    for (var i in _root.empty_MC) {
    var prop = _root.empty_MC[i];
    if (typeof prop == "movieclip") {
    prop.stop ();
    }
    }
    }

    I dont recommend coding like that; when you get more advanced you will see better ways..but for what you are doing it may be fine. You will at least need to learn to name your movieclip instances and reference them directly though.


  • Is the animation taking place on the main timeline of fg.swf, or movieclips within that file?


  • Yes. If you say _root.empty_MC.fgMC.stop() then only fgMC is going to stop, not everything. Each timeline that you want to stop has to be specifically told to stop.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Another pause MC problem :( , Please add it free.