View Full Version : delay code?
behmat
04-26-2009, 05:53 PM
how we can use a delay code for keyframes or functions?
for ex. wait 3s in some frame or do some function after 3s?
loadlearn
04-26-2009, 07:27 PM
setInterval or setTimeout.
cjx3711
04-27-2009, 03:43 AM
You could just have a movieclip that constantly adds to a counter on the root and when the counter reaches a certain number, then the function starts.
loadlearn
04-27-2009, 03:49 AM
Wonder what setinterval and setTimeout are if not basically counters! :rolleyes:
cjx3711
04-27-2009, 06:14 AM
alright, fine. They are counters, but I have had bad experiences with them and I prefer the other method. I find it more reliable. :)
kkbbcute
04-27-2009, 10:43 AM
Why don't just use a var that constantly adds to itself using an onEnterFrame, instead of putting the code into an Mc and what not? ;)
behmat
05-04-2009, 05:58 PM
why this code dosen't work properly?
on (keyPress "a") {
gotoAndStop(_currentframe+130);
}
i become so confuse cause in one project this code is work good but in the other one dosen't
kkbbcute
05-05-2009, 01:31 PM
Is your code on a button? Also, ensure that you are referring to the correct timeline, maybe you meant this._parent.gotoAndPlay()
behmat
05-06-2009, 02:14 PM
when i trace the code, we have no connection with keyboard
what happened?
kkbbcute
05-06-2009, 02:41 PM
Are there any compiler errors? I think you placed the code at the wrong place.
behmat
05-11-2009, 01:29 PM
tanks, my promlem is solved
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.