In case the framerate get >= 45, wouldn't this put the framerate up to a endless high number?
-----Original Message----- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu Sent: vrijdag 13 augustus 2010 16:36 To: Flash Coders List Subject: Re: [Flashcoders] Could this be done more elegant. This doesn't change the way it works, but you could rewrite the addValue stuff to this: buffer += (fps >= 45) ? 1 : -1; On Fri, Aug 13, 2010 at 4:45 AM, Jiri <jiriheitla...@googlemail.com> wrote: > Thanx for the answer, I am on a project where the whole thing is allready > set up. The quality is now set to BEST as soon as the FPS goes under 30 (i > used 45 in my example), but on fast machine this results in very short > graphical glitches, because it is usually only 1 or 2 frames where the FPS > is below 30. > I wanted to prevent this and make the profiling a bit better. Not toggle > all the time, but just wait a bit before doing the call. > > So it is not so much about the execution based on EnterFrame but more on > how to write the function a bit cleaner. > > Jiri > > > On 13-08-10 10:29, Henrik Andersson wrote: > >> I use a different event than what you are most likely using. I use the >> Render event. It is a bit more effort since you have to request it again >> and again, but it is more accurate for the rendered fps. >> >> It differs from the enter frame event in that it is not dispatched when >> the player is skipping frames. >> _______________________________________________ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3067 - datum van uitgifte: 08/12/10 20:34:00 _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders