----- Original Message ----- From: "Kalani Bright" <[EMAIL PROTECTED]> To: <flashcoders@chattyfig.figleaf.com> Sent: Thursday, March 01, 2007 4:55 AM Subject: RE: [Flashcoders] Getting frustrated. regarding set Interval,and for loop.
> 1) setInterval is not accurate. Try moving the window around and see if the > function gets called when it's supposed to. Keep a timer and compare the > interval call to the time over say a minute to 2 minute period. You could > be off by several or more seconds, and if you move the window around like > crazy your 1 second interval could be called 7 seconds later. This is a player problem, not a setInterval problem. Same thing happens when you use onEnterFrame. Noone said setInterval is accurate, I think it even states in the docs it's not accurate. <quote> If interval is less than the SWF file's frame rate (for example, 10 frames per second [fps] is equal to 100 millisecond intervals), the interval function is called as close in time to the value of interval as possible. Executing long, memory-intensive scripts during an interval causes delays. If the function being called initiates a change to visual elements, you should use the updateAfterEvent() function to make sure that the screen refreshes often enough. If interval is greater than the SWF file's frame rate, the interval function is called only after interval has expired and the playhead has entered the next frame; this minimizes the impact each time the screen is refreshed. </quote> > 4) Even with a reference to the interval the interval may not always be > deleted. Sorry, it's not. Do some tests. This is especially the case if > you use delegates with your setinterval. The management problem for > performance gets even worse. Making sure you delete and clear everything. > But in my experience the intervals don't clear like they should even went > set to self-destruct. So far I never had issues with clearing a setInterval. But that might be because I stick to the rules I mentioned earlier. I do make sure to test them extensively when I do use them. > 5) The 3 parameter setinterval call is not for scope, its for the object > containing the method you want to call, if thats what you meant by scope. Yup, my worthing wasn't correct. > The object could be removed and the interval continue to be called. Not if you make sure to clean up properly. > PS -(Try and be helpful rather than sticking your nose up at people) It's my nose, I'll do with it whatever I please, tyvm.. regards, Muzak _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com