all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

Wait function? or something



Wait function? or something SmpleJohn
11/19/2006 2:25:37 AM
flash actionscript: Hello. I've developed a .mp3 player, and would like it to continue to the next
song as it plays through the music. Here is a link:
http://www.smple.com/eleveneleven/audioPlayer.

I need to figure out how to make the timeline wait on one frame a number of
seconds before it executes the next script. Any help would be appreciated.

Thank you,
John
Re: Wait function? or something physicsȨÍþ
11/19/2006 4:29:47 AM

"SmpleJohn =D0=B4=B5=C0=A3=BA
"
[quoted text, click to view]

I think you can do it like this:
1 Creat a sprite.
2 In the sprite,you make two layer:one action layer and the original
layer.
3 On the action layer,you creat 3 frames.On the first frame,you write:
_parent.stop();
a=3DgetTimer();
On the second frame,you write:
b=3DgetTimer();
if (b-a=3D=3Dtime){//time is the time you wanna wait,eg.1000(The unit is
millisecond!!!)
_parent.play();
}
On the third frame,you write:
gotoAndPlay(_currentframe-1);
4 Put the sprite on the frame you wanna stop.And that is ok.
If you still have any questions,you can contact me : h2oqu@yahoo.com.cn
Re: Wait function? or something kglad
11/19/2006 3:27:27 PM
Re: Wait function? or something Jose Guevara
11/19/2006 3:46:21 PM
don't forget to clearInterval otherwise it keeps on going :-)

JG


[quoted text, click to view]

AddThis Social Bookmark Button