A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Movie Clip

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    20

    Movie Clip

    I have a child movieclip with 12 frames. When main MC starts the first frame in the child MC is shown. I progress through all the frames of child MC on each click of a button. Now when I reach the 12th frame I want to play first frame again on the next click and in that way I want to loop through the frames. I have written following script on the onRelease event of the button:

    on (release) {
    _root.pic.nextFrame();
    if (_root.pic._currentframe == 12) {
    _root.pic.gotoAndStop(1);
    }

    With this I am not getting the expected behaviour. Can anybody suggest the solution to this problem?

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    I think i would add an extra frame to your child clip with:
    gotoAndStop(1);

    on it, then just:
    on (release) {
    _root.pic.nextFrame();
    }

    on the button
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    20

    Thanks It worked

    Thanks It worked

  4. #4
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    glad to help




    -long live flashkit-
    Evolve Designs Interactive Media
    the natural selection

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