Re: [flexcoders] callLater, FPS, and lengthy background operations
Thanks Alex, that is useful :) On Sun, May 25, 2008 at 1:59 PM, Alex Harui <[EMAIL PROTECTED]> wrote: >There's a post on my blog you may find useful: > http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html > > > -- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Josh McDonald > *Sent:* Saturday, May 24, 2008 3:36 AM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] callLater, FPS, and lengthy background operations > > > > Hi Guys, > > If I have a long list of things to process as a background task, I figure a > good way to do it is a piece at a time with callLater(). However I'd like to > be able to detect if I'm taking too long per block and running into the next > frame. Also, I'd like to do more per cycle if my app finds itself running on > a ninja machine :) > > Anyone have any tips for this sort of thing? Should I just be using the > timer and striving for 1/4 of a frame measured in ms? What framerate are > Flex SWFs set to run at normally? > > Cheers, > -J > > -- > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > :: Josh 'G-Funk' McDonald > :: 0437 221 380 :: [EMAIL PROTECTED] > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] callLater, FPS, and lengthy background operations
There's a post on my blog you may find useful: http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Saturday, May 24, 2008 3:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] callLater, FPS, and lengthy background operations Hi Guys, If I have a long list of things to process as a background task, I figure a good way to do it is a piece at a time with callLater(). However I'd like to be able to detect if I'm taking too long per block and running into the next frame. Also, I'd like to do more per cycle if my app finds itself running on a ninja machine :) Anyone have any tips for this sort of thing? Should I just be using the timer and striving for 1/4 of a frame measured in ms? What framerate are Flex SWFs set to run at normally? Cheers, -J -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Re: [flexcoders] callLater, FPS, and lengthy background operations
Framerates by default are set to 40 FPS. If you happen to have a reference to the stage, you can use the stage.frameRate property. That way you have a solution for all frame rates. I would use an enterFrame solution like callLater, then just check the time within a while loop. Greetz Erik On 5/24/08, Josh McDonald <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > If I have a long list of things to process as a background task, I figure a > good way to do it is a piece at a time with callLater(). However I'd like to > be able to detect if I'm taking too long per block and running into the next > frame. Also, I'd like to do more per cycle if my app finds itself running on > a ninja machine :) > > Anyone have any tips for this sort of thing? Should I just be using the > timer and striving for 1/4 of a frame measured in ms? What framerate are > Flex SWFs set to run at normally? > > Cheers, > -J > > -- >
[flexcoders] callLater, FPS, and lengthy background operations
Hi Guys, If I have a long list of things to process as a background task, I figure a good way to do it is a piece at a time with callLater(). However I'd like to be able to detect if I'm taking too long per block and running into the next frame. Also, I'd like to do more per cycle if my app finds itself running on a ninja machine :) Anyone have any tips for this sort of thing? Should I just be using the timer and striving for 1/4 of a frame measured in ms? What framerate are Flex SWFs set to run at normally? Cheers, -J -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]