dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: -another- loop question

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    11

    -another- loop question

    hey, im trying to make a loop that with play through once, and reach the action, loop back. then either ignore the action, or know to go on to the next frame. i was going to just copy and paste all my frames again, but why use that much space when i could just use a script right?

    i wish flash worked with the qbasic language cause i'd be all like

    gotoandplay(24)
    LOOP = LOOP + 1
    if loop > 1 then
    gotoandplay(50)

    wow that would be real sweet.

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    //frame 1
    myloop = 0

    //frame 2
    myloop += 1
    start you ani

    //frame 24
    if(myloop != 0){
    gotoAndPlay(50);
    }

    Is this what your looking for?

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    11
    i want it to play through, to frame 49, go back to frame 24, play through the rest of the image. i probably should have been more descriptive the first time ,sorry.

  4. #4
    Junior Member
    Join Date
    Oct 2005
    Posts
    11
    im using flash 8 pro; btw.

  5. #5
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262
    Does the movie continue past frame 49? If not and you want to go back to 24 every time 49 is hit just put this on frame 49:
    code:
    gotoAndPlay(24);

    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  6. #6
    Junior Member
    Join Date
    Oct 2005
    Posts
    11
    i dont want it to go back every time, just once. that is why i tried using variables but i cant get the syntax right.

  7. #7
    Junior Member
    Join Date
    Oct 2005
    Posts
    11
    //first frame
    Myloop == 0
    //when the animation starts
    Myloop == Myloop + 1
    //when i want it to loop; and go back to the beginning(27) i have
    if(Myloop == 2 ){
    gotoAndPlay(50);
    }
    else if gotoAndPlay(27);
    }

    ahhhh confused

  8. #8
    FK's Official Mac Hater jasonsplace's Avatar
    Join Date
    Mar 2002
    Location
    Provo, Utah
    Posts
    2,245
    Frame 49 actions:
    if(myFlag != 1)
    {
    myFlag = 1;
    gotoAndPlay(24);
    }
    Jason L. Wright
    I'm not that hard to imitate. Just make some random negative claim at Apple or anything else for that matter and then have nothing to back it up.

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