A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Loop parameter

  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    26
    I want my animation to loop 3 times. I know I can duplicate the frames 3 times, but is there a way to do this in the parameter? I have looked at the help file but did find anything.

  2. #2
    Senior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    379
    You can do it with ActionScript:

    Select the last frame of your movie.
    Open the sound and actions panel (ctrl + e)
    Click on the "+" at bottom right (add action)
    click "Advanced" > "ActionScript..."

    In the window that opens, type (or copy/paste) this code:

    numOfLoops = numOfLoops + 1;
    if (numOfLoops == 3){
    stop();
    }

    Click "Ok" then "Close"

    Test your movie....
    Should work ok - but...

    to do this properly, put the following actionscript On frame 1 ( I will have the purists after me if I didn't tell you this bit!)

    var numOfLoops;


    Hilary

    --

  3. #3
    Junior Member
    Join Date
    Sep 2000
    Posts
    26

    Version to do this?

    I am running 3.20, when I do a ctrl-e I get the window, but there is no + in lower right. There is a + in the middle left but it won't won't open a window to paste in the code.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512

    Re: Version to do this?

    It is in the control group titled Actions for Selected Frame. Click on the +, select Advanced, select Action Script.

  5. #5
    Junior Member
    Join Date
    Sep 2000
    Posts
    26

    Still Lost

    Yep, been there.

    There is the Actions for Selected Frames.

    When I click on the + I get the following options only:

    Go To Frame....

    Play Movie
    Stop Movie
    Stop Sounds

    I cannot find your selections anywhere.

    If I go to the help index, I do not get a hit on Action or Script.

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512

    Re: Still Lost

    Switch to the Advanced Skills interface in Preferences.

  7. #7
    Junior Member
    Join Date
    Sep 2000
    Posts
    26

    Ahhhhh

    Yep. There it is thanks.

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