How to stop and resume the animations of nested movieclips

Hi
I have many nested movieclips  in different positions of the main timeline.
I have 2 buttons, play_btn and pause_btn.
I'd like when the user click pause_btn, the animations on the main timeline and in nested movieclips stop.
Whe he click play_btn the animations resume in both the main timeline and nested movieclips.
I have created array of nested movieclips on the main timeline.
var arr:Array = new Array(mc1, mc2, mc3, mc4, mc5);
play_btn.addEventListener(MouseEvent.CLICK, on_play_btn);
pause_btn.addEventListener(MouseEvent.CLICK, on_pause_btn);
function on_play_btn(e:MouseEvent):void
     gotoAndPlay(currentFrame);
     for(var i:Number = 0; i < arr.length; i++)
         if(arr[i] != null)
             arr[i].play();
function on_pause_btn(e:MouseEvent):void
     gotoAndStop(currentFrame);
     for(var k:Number = 0; k < arr.length; k++)
         if(arr[k] != null)
             arr[k].stop();
but it only stops the animations on the main timeline and dosen't stop the animations in the nested movieclips.
Help me Please.

I'm having the same issue.I have a main timeline, which has nested movieclips with there own timelines and motion tweens. Using the new motion tween, and not the classic tween, which may or may not be the problem.
Was having a similar issue with stopping the timeline, the main timeline would stop, but the nested movieclips would keep going. Found this blog post that helped.
http://blog.nobien.net/2009/02/05/as3-stopping-all-timeline-animations/
Used the code below to stop everything by passing the stage as the displayObject. Worked great, but now i'm having the reverse issue. When I resume play, the nested movieclip timeline stays exactly where I stopped it, and the main timeline resumes play. If there are a 100 frames in the nested movieclip, once it reaches the 101st frame, the main timeline kicks in again.
function stopAllChildMovieClips(displayObject:DisplayObjectContainer):void{
        var numChildren:int = displayObject.numChildren;
        for (var i:int = 0; i < numChildren; i++) {
            var child:DisplayObject = displayObject.getChildAt(i);
            if (child is DisplayObjectContainer) {
                if (child is MovieClip) {
                    MovieClip(child).stop();
                    stopAllChildMovieClips(DisplayObjectContainer(child));

Similar Messages

  • How to STOP and START the BO EXPLORER/POLESTAR - LINUX

    Dear friends,
    Could you please let me know on How to STOP and START the BO EXPLORER/POLESTAR on LINUX platform?
    Thank you,
    Nikee

    Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
    When an Apex session starts it starts calling the API.
    You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
    The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
    Regards,

  • How to Stop and restart the midtier?

    Hello All,
    I have installed Oracle AS (Infraturcture & middle tier , BI & Forms) on same Linux box.i.e: Oracle As 10.1.2.0.2 (Rel 2, x86 for Linux), SLES 9
    Here is my question:
    How to Stop and restart the midtier?
    Regards,
    DN

    biforms.sh
    export ORACLE_HOME=/opt/oracle/biforms
    export OH=$ORACLE_HOME
    export PATH=$OH/bin:$OH/opmn/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
    export ORACLE_SID=ORCL
    export LD_LIBRARY_PATH=$OH/lib:/usr/openwin/lib:/usr/dt/lib:/usr/lib:/tools/lib
    infra.sh
    export ORACLE_HOME=/opt/oracle/infra  <-- or correct one!
    export OH=$ORACLE_HOME
    export PATH=$OH/bin:$OH/opmn/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
    export ORACLE_SID=ORCL
    export LD_LIBRARY_PATH=$OH/lib:/usr/openwin/lib:/usr/dt/lib:/usr/lib:/tools/libAs you see, only the first row differs from these two scrips. Because I'm lazy, I usualy set export OH. Under certain circumstances you might want to add DISPLAY to biforms.sh. Set it to localhost:0 or whatever is correct.
    Martin

  • How to Stop and restart the OC4J_BI_FORMS?

    I have Oracle AS 10.1.2.0.2 (Rel 2) installed. (Infratsructure & BI & Forms) on same computer.
    my question is :
    How to Stop and restart the OC4J_BI_FORMS?
    Regards,
    DN

    Just as any other OC4J:
    opmnctl stopproc -process-type=OC4J_BI_FORMS
    opmnctl startproc -process-type=OC4J_BI_FORMS
    or
    opmnctl restartproc -process-type=OC4J_BI_FORMS
    cu
    Andreas

  • In Flex 3 how to Stop and Replay .swf animation created in Flash

    Hi
    I have an animation file that is created in Flash (I think
    CS3). In Flex if I import it inside a SWFLoader or if I import it
    as an Image. It plays once and stops. Then I can not replay it. I
    also can not pause it when its playing.
    I have tried few things based on help and code available in
    the Web to of no help. I have tried to convert the swfLoader
    instance to a movie clip like so to stop
    var c:MovieClip = swfLoaderHeaddress1.content as MovieClip;
    c.stop();
    <mx:SWFLoader x="53" y="116" width="206" height="255.3"
    visible="true"
    source="assets/animations/curatorial/ZoomHeadress_2nd.swf"
    id="swfLoaderHeaddress1"/>
    It does not work.
    I have not created the .swf animation, I am not sure how it
    is done. I belive it may not be using any ActionScript as I know
    the artist who created it does not know ActionScript. Does
    something need to be done inside the Flash to support the stop and
    play? Or is there a way to restart/replay stop a .swf animation in
    Flex 3 no matter how (and whether or not its developed using
    ActionScript) its developed in Flash?

    One way is she has to add some AS code to the animation, or
    you can do it yourself.
    In swf there must be something like this:
    var connReciever:LocalConnection = new LocalConnection();
    connReciever.client = this;
    connReciever.connect("fromFlexToSWF");
    function myFunction(parameter:SomeClass):void {...}
    And in Flex:
    var connSender:LocalConnection = new LocalConnection();
    connSender.send("fromFlexToSWF", "myFunction", [..args]);
    The other way: in case with just play/stop there is a way to
    resolve this by using that Flex Component Kit (or maybe "Flex Skin
    Design Extension", i do not remember), it is something like she
    just adding labels to animation frames then she exports it with
    Flex Kit and then you can work with it like with an object with
    "states".

  • How to stop and resume smart card reader handle using OCF framework

    I need to stop the reader handle and transfer the handle to other application and after reply from that application, i have to resume the reader handle.
    I tried Smartcard.shutdown and then I used SmartCard.start but it doesnt help.
    Can anyone help me to sort out this issue?
    Provide some sample code if possible.
    Thanking you in advance.

    with ocf you have CardTerminal instances to represent readers.
    Did you try the close() method on your CardTerminal instance?
    afterwards, you can open() it.

  • How to stop and resume a subVI from the main VI?

    I am trying to write a test sequencer, I need to start a subVI (which is a test sequence) from my main VI, I'd like to control the execution of subVI by pressing the 'stop' 'resume' 'jump step' button in the main VI. Does anyone have any idea how to implement this in LV?
    Thank you.

    Yay for State Machine!! I would actually recommend the State Machine Using Events design pattern. Taking advantage of the Event Structure will allow you to replace the "Idle" state in the traditional state diagram design pattern. Instead, we are not waking LabVIEW to handle particular events on the front panel.
    More information regarding the State Machine design pattern as well as design patterns in general are available:
    NIDZ Tutorial: Changing the Face of Design Patterns with LabVIEW 7 Express Event Structure
    NIDZ Tutorial: Applicati
    on Design Patterns: State Machines
    LabVIEW Application Design Patterns
    Good luck.

  • How to stop and start process SAPOSCOL

    Hi, i have a problem with write access for saposcol program. I see that the file saposcol is read the file but its unable to wirte the same.
    Collector           : running
    Start time coll.    : Mon May 21 17:49:49 2007
    Current Time        : Mon Jun 11 13:27:51 2007
    Last write access   : Tue May 29 06:23:46 2007
    Last Read  Access   : Mon Jun 11 13:26:24 2007
    When i try to stop the saposcol i get the following error:
    igzadm> saposcol -k
    Setting Stop Flag :
    13:24:44 11.06.2007   LOG: ==== Stop Flag was set by saposcol (kill_collector()).
    13:24:44 11.06.2007   LOG: ====  The collection process will stop as soon as possible
    can't kill process 409656.
    kill: No such process
    ERROR:No reaction from collecting process 409656.
          Please kill collecting process.exes.
    Am doing this command through SID<ADM> from change directory /run.
    Please help me how to check the permission of the SIDADM to stop the services.
    I also try the same from root user but now use..
    Please guide me how to stop and start the SAPOSCOL in AIX 5.3.
    Advance Thanks.
    Suri Tyson

    Hi, i have the following permission for saposcol
    imserv:/ # ps -ef | grep saposcol | more
        root  118842  528422   0 14:02:17  pts/2  0:00 grep saposcol
    I have changed the ownership as you mentioned....
    imserv:/usr/sap/IGZ/SYS/exe/run # ./saproot.sh igz
    Preparing /usr/sap/IGZ/SYS/exe/run/brbackup ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brarchive ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brconnect ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brtools ...
    Preparing saposcol ...
    Preparing icmbnd ...
    done
    However, i still get the error as:
    igzadm> saposcol -k
    Setting Stop Flag :
    14:12:13 11.06.2007   LOG: ==== Stop Flag was set by saposcol (kill_collector()).
    14:12:13 11.06.2007   LOG: ====  The collection process will stop as soon as possible
    can't kill process 409656.
    kill: No such process
    ERROR:No reaction from collecting process 409656.
          Please kill collecting process.
    Now the permission are set in my system as:
    igzadm> ps -ef |grep saposcol|more
      igzadm  729196  983058   0 14:13:25  pts/2  0:00 grep saposcol

  • How to stop and Start ASM in 11gR2

    Hi,
    Any one please let me know the complete process of how to stop and start the ASM instance in
    11.2.0.1 oracle.
    Thanks.
    Ali

    Hi;
    If you need to close ASM than you need to also close database
    You need to close db:
    srvctl stop database -d instance_name
    or
    set ORACLE_HOME and ORACLE_SID
    sqlplus "/as sysdba"
    shutdown immediate;
    srvctl stop LISTENER
    srvctl stop ASM -f
    or see:
    Stop asm instance in standalone database
    Re: Stop asm instance in standalone database
    Regard
    Helios

  • How to Stop and Start Scheduler Service

    Does anyone know how to stop and start the Scheduler service for Hyperion Financial Reporting in release 9.3.1?

    please see the metalink note
    How to Start/Stop MWA Services Using Control Scripts adstrtal.sh/adstpall.sh? [ID 731320.1]
    This is how i startup and shutdown WMA
    for stopping :
    1) login to Applications tier
    2) To see if the MWA (telnet) server is running use:
    ps -ef|grep DPID
    3) cd $MWA_TOP/bin
    3) ./mwactl.sh -login sysadmin/xxxxx stop_force 10200;
    4) check the wma process from OS level
    ps -ef|grep mwa
    for starting
    1) login to Applications tier
    2) cd $MWA_TOP/bin
    3) ./mwactl.sh -login sysadmin/xxxxx start _force 10200;
    4) check the wma process from OS level
    ps -ef|grep mwa

  • Trying to install Leopard on my iMac (G5).  Got to the screen that asks for the user name and password and it won't take it.  How do I get out of this and resume the software install?

    Trying to install Leopard on my iMac (G5).  Got to the screen that asks for the user name and password and it won't take it.  How do I get out of this and resume the software install?

    Help here >  Mac OS X: Changing or resetting an account password

  • TS3297 I bought an album, two of the twelve songs play about half the way through, then stop, and then the next song in line starts playing.  How do I get the songs downloaded so they play to the end?

    I bought an album, two of the twelve songs play about half the way through, then stop, and then the next song in line starts playing.  How do I get the songs downloaded so they play to the end?

    Welcome to the Apple Community.
    Try deleting the problematic file (electing to remove original file if/when prompted) and then re-downloading the file from the iTunes store.
    You can re-download content purchased from the iTunes store (availability varies depending on location) using the purchased option from the Quick Links section in the top right corner of the iTunes homepage in your iTunes application on your computer.
    You can re-download content purchased from the iTunes store (availability varies depending on location) using the purchased option at the bottom of the screen of the iTunes app (or video app) on your iOS device.
    If the problem re-occurs, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History using your computer.

  • HT1725 I downloaded an album and all of the tracks will play about 3/4 of the song then stop and play the next song.  I went to itunes store and it said the songs fully downloaded. So how do I get the full song into my library?

    I downloaded an album and all of the tracks will play about 3/4 of the song then stop and play the next song.  I went to itunes store and it said the songs fully downloaded. So how do I get the full song into my library?

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • When using the "Books" app on my ipod touch, if I open one of my books there is no way to return to the library without stopping and restarting the app. What am I doing wrong?

    Once I open a book in my library there is no option to close it and return to the library. I must leave the app, stop the app and then restart it. How do I exit an opened book to return to my library without having to exit, stop, and restart the app?

    Assuming you are talking about "iBooks", then just
    tap the center of the screen
    and you should see a "Library" in the upper left corner of the screen.
    tap the center of the screen again,
    and you should return to full screen mode.
    if this is NOT iBooks, then I do not know what controls that app

Maybe you are looking for