I want my code to wait for a couple of seconds before executing. So is there any function similar to sleep in flex?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no sleep or delay function in ActionScript. Like JavaScript, you can use
setTimeout()instead like this:Once you link the
trigger()function to any event such as ‘click’, when the event happens alert box will show up after 1 sec.There is also
setInterval()andclearlnterval()functions you can use for repetition. However, it is recommended to use theflash.utils.Timerclass in that case.