A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How To Autoplay after 5 seconds.

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    How To Autoplay after 5 seconds.

    Hello There,

    I'm quite new to the flash, but i started one website and i really want to get it done...

    i have a flash file that has the "buttons" to go the next "scene" but what i would really like is to add timer so after 5 seconds if i dont click the "next" button it will move to another scene/frame,

    To make it easy to understand, i will upload my fla file, if someone knows how to do it feel free to edit the fla and send it to me (im asking to much ) ??

    oceantechit.com/header_v8.zip

    Im using macromedia flash pro 8 to edit this file.

    THNX A LOT.

  2. #2
    Senior Member
    Join Date
    Mar 2005
    Location
    U.S.A . VA.
    Posts
    108
    Why not just take a look at your FPS ((lets say it was 12))

    What your FPS means is Frames Per Second, so 12 FPS means 12 frames pass by in 1 second

    Furthermore
    12 x 5 = 60

    So by adding 60 frames you will have a very basic way of "Auto" play

    ((For this to work you wont be able to use "Stop ()" ))
    How can you say so much, but say so little?

  3. #3
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    On your frame, add this:

    Actionscript Code:
    function autoPlay(){
        play(); // or do something else
    }

    myInterval = setTimeout(autoPlay, 1000);

    if they click on a button, use this code to eliminate the interval:

    Actionscript Code:
    clearInterval(myInterval);

    Hope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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