A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to stop a MovieClip Looping on addChild?

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    26

    how to stop a MovieClip Looping on addChild?

    Hello

    I have a movie clip in the library which is an animation of some 72 frames.

    When I add it using addChild it loops, I would like it to play once then stop.

    A stop() in the last frame of the movieclip does not seem to be executed.

    Any ideas gratefully received.

    thank you

    Beth

  2. #2
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    Try something like this.

    Code:
    if (yourMc.currentFrame == totalFrames) {
    		yourMc.stop();
    }

  3. #3
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    You need to identify why the stop command is being ignored in the last frame. That is the common method to halt the animation of a timeline.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center