-
YH Jelly Llama Jockey
hey guys, hope you can help ,me out with this one.
What I want to do is have a loop that will run every few seconds. I thought about using a simple while loop but that would do like 30 loops instantly, I also considered making a movie clip with 20 empty frames to represent a time gap between "plays" but that seems a little messy.
Ideally I need it to run every second (I know it will be more/less on different computers), I know it will be using the get timer (I assume) so any help would be great.
-
hey defuzz
you can make this type of loop:
//first frame:
startTime = getTimer()
endTime = 1000
//second frame:
if (getTimer() - startTime < endTime) {
play()
} else {
gotoAndStop(1)
}
//third frame:
if (getTimer() - startTime < endTime) {
this.gotoAndPlay(2)
} else {
gotoAndStop(1)
}
hope this helps
Alex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|