RE: [flexcoders] Timer questions
setTimeout() is considered the "old way" and Timer the "new way", although I don't think setTimeout() has been officially deprecated. Timer is considered better because it is more object-oriented and event-oriented, which are hallmarks of AS3 programming. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Thursday, April 24, 2008 6:56 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Timer questions along these same lines, is there a reason to use a Timer vs a "setTimeout" call for simple timeout type events? I recall the docs seeming to hint that a Timer is better, but I find the setTimeout event REALLY useful. - Kevin On Apr 22, 2008, at 11:48 PM, Alex Harui wrote: Flex/Flash is single-threaded which means that nothing can keep the next line of code from running. You won't get a timer event until you finish your loop, and you don't need to worry about calling stop() until you no longer want timer events. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Tuesday, April 22, 2008 8:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Timer questions 1. If I timer.start() in a loop will the loop be waiting for TimerEvent to complete before it (loop) moves to next step? 2. Do I need to timer.stop() inside of TimerEvent handler to make sure Flex processes that handler in a whole? What I mean is if a timer interval is very small and handler processing takes longer then timer interval then timer might interrupt it before it is complete. Thanks for help.
Re: [flexcoders] Timer questions
along these same lines, is there a reason to use a Timer vs a "setTimeout" call for simple timeout type events? I recall the docs seeming to hint that a Timer is better, but I find the setTimeout event REALLY useful. - Kevin On Apr 22, 2008, at 11:48 PM, Alex Harui wrote: Flex/Flash is single-threaded which means that nothing can keep the next line of code from running. You won’t get a timer event until you finish your loop, and you don’t need to worry about calling stop() until you no longer want timer events. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Tuesday, April 22, 2008 8:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Timer questions 1. If I timer.start() in a loop will the loop be waiting for TimerEvent to complete before it (loop) moves to next step? 2. Do I need to timer.stop() inside of TimerEvent handler to make sure Flex processes that handler in a whole? What I mean is if a timer interval is very small and handler processing takes longer then timer interval then timer might interrupt it before it is complete. Thanks for help.
RE: [flexcoders] Timer questions
Flex/Flash is single-threaded which means that nothing can keep the next line of code from running. You won't get a timer event until you finish your loop, and you don't need to worry about calling stop() until you no longer want timer events. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Tuesday, April 22, 2008 8:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Timer questions 1. If I timer.start() in a loop will the loop be waiting for TimerEvent to complete before it (loop) moves to next step? 2. Do I need to timer.stop() inside of TimerEvent handler to make sure Flex processes that handler in a whole? What I mean is if a timer interval is very small and handler processing takes longer then timer interval then timer might interrupt it before it is complete. Thanks for help.
[flexcoders] Timer questions
1. If I timer.start() in a loop will the loop be waiting for TimerEvent to complete before it (loop) moves to next step? 2. Do I need to timer.stop() inside of TimerEvent handler to make sure Flex processes that handler in a whole? What I mean is if a timer interval is very small and handler processing takes longer then timer interval then timer might interrupt it before it is complete. Thanks for help.