A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] Problem with gotoAndPlay

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    40

    [F8] Problem with gotoAndPlay

    When I use gotoAndPlay to tell one of my movieclips to go to frame 2 which I've labeled "turn" (as it's the animation of the movieclips turning around) it goes to frame 2 and stops as if I said gotoAndStop("turn"). I looked for any rogue stop commands but there aren't any. I've even added a play() command to frame 2 to make sure it plays in case I missed any stop statements but it doesn't make a difference.

    Any ideas?

  2. #2
    Actionscript Flotsam
    Join Date
    Feb 2003
    Posts
    33
    Is your gotoAndPlay the last command in the function? Sometimes if you continue to issue commands after a gotoAndPlay, it will interrupt the Play.
    loadMovie("self",ducati);
    ducati.play();

  3. #3
    Member
    Join Date
    Jun 2007
    Posts
    40
    It's not, there's an if statement after it, but the it statement has to execute after the gotoAndPlay.

  4. #4
    Actionscript Flotsam
    Join Date
    Feb 2003
    Posts
    33
    I'd suggest you comment out the if statement and see if your movieclip plays without stopping. If you isolate that if statement as the problem, maybe you can find someplace else to put it (like on frame 2 "turn" in the targeted moviecip?).
    loadMovie("self",ducati);
    ducati.play();

  5. #5
    Member
    Join Date
    Jun 2007
    Posts
    40
    I commented out the if statement and the problem still occurs. I even tried stacking gotoAndPlay commands one after another as in:

    code:

    gotoAndPlay(2);
    gotoAndPlay(3);
    gotoAndPlay(4);
    gotoAndPlay(5);



    I've also tried gotoAndPlay(3); and it'll go to frame 3 and stop.

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