Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: A way for an accurate delay using Loop while??
From: Wayne Townsend
Date: Tue, 7 Dec 1999 15:37:48 GMT

>Hi all,
>
>I need to make a timer in flash that will play a frame after 1
>second. I have tried the timer at
>http://www.moock.org/webdesign/flash/ but I can still notice a
>slight delay when using sounds. I think this is because Flash isn't
>very accurate when looping between frames. And I need for it to play
>very accurately once every second. The only way I can think of is to
>use the Loop action. However I keep running into problems where I
>get errors saying that flash exceeded 200,000 actions. Has anyone
>had any success in getting flash to play at a consistent speed?

You can use a timer loop.

Set up 3 frames where you want the delay.

Frame 1:
Action:
Set Variable: "theTicks" = 1000 (Approximately 1 second per 1000)
Set Variable: "targetTime" = GetTimer
Set Variable: "targetTime" = targetTime + theTicks

Frame 2:
Label: "timeloop1"

Frame 3:
Set Variable: "thetime" = GetTimer
If (thetime < targetTime)
Go to and Play ("timeloop1")
End If

There might be a better way, but this one works for me. You can fine
tune "theTicks" - it's *around* 1000 per sec.

HTH,

/wayne

Wayne Townsend
waynetatabsolute [dot] net
AccessOn.Net
WebStaffing.Net
http://accesson.absolute.net

Check out our latest Flash-4 BingoTelevision game at:
http://accesson.absolute.net/bgo.html
-Companion site to the live Saturday TV broadcast from Palm Springs
Television Studios.


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: A way for an accurate delay using, Jake McFee

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]