Forum ActionScript 3.0 Flash Redraw Time

Problems and discussions relating to ActionScript 3.0 here.

Flash Redraw Time

Postby mfranzs » July 5th, 2011, 12:23 am

Hey-

I'm working on optimizing some graphics, but am unable to find a way to determine how long it takes flash to draw them.

Does anyone know of a way to do this?

Thanks!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Flash Redraw Time

Postby Benjaminsen » July 9th, 2011, 6:45 pm

Mmm, you should be able to get an approximation by doing the following.

1: Set frame-rate to 120
2: Start time as the last line of an enterframe listener
3: Write out time since exit frame on enter frame.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Flash Redraw Time

Postby mfranzs » July 30th, 2011, 7:05 pm

Wow, works great, thanks ^^
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Flash Redraw Time

Postby Benjaminsen » July 31st, 2011, 9:05 pm

Even better, Flash Builder comes with a profiler that will tell you exactly how much of the CPU is taken up by rendering.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to ActionScript 3.0



cron