A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: BASIC flash 4 question

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    2

    Smile

    Ok - this has stumped me for more than an hour..............

    im a noob Flash user but have managed to easily create a simple animation with a number of moving elements on a few layers. But - what i cant work out is how to get the complete animation to loop only a set number of times!!! obviously, exporting to gif i can do it but as a .swf???? it cant be hard, can anyone please let me in on the secret.

    Im using Flash 4!

    cheers

  2. #2
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Ahhh... the days of flash 4... ahem!

    You need to set a variable in frame 1 called something like 'counter' to 0. Also, set a variable called 'maxcount' and set this to the amount of times you want to loop the animation.

    Then, in the last frame of the animation, make the 'counter' variable increase by 1.

    Now use an if statement that checks if the 'counter' variable is equal to the 'maxcounter' variable. If it is then stop the movie. And if it is not, goto and play frame 2.

    Hope this helps.

    XFM

  3. #3
    Junior Member
    Join Date
    Oct 2001
    Posts
    2
    Thanks for the tip. i had tried something along these lines but (cos im a novice..) didnt have much luck. ill have another go!

    thanks again!

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