Archive for the ‘Flash Tips’ Category

Generating Flash Style “Size Reports” in Flex Builder

Sunday, December 6th, 2009

As I continue the transition from building ActionScript executions in Flash to going with a Flex-only method, I came across something I hadn’t tried in Flex before: size reports.

The Flex debugger provides an “uncompressed” size of your application in the trace output, but there’s no obvious way in the UI to show that breakdown. Being that Flex’s guts are in the command line, however, that’s where we can generate the size report.

If you check out your project preferences, click on ActionScript Compiler and add the following to the text field under “Additional compiler arguments:”

-link-report output.xml

where “output.xml” is the path to the file generated.

project_dropdowncompiler

Once you’ve got your file (which is really a thorough report on class linkage and more), though, you’re not yet done; if you open it up and take a look, it’s quite confusing.

size-report

Fortunately, there are a couple apps that will parse and clearly display the size report. I haven’t really tested them fully, but both look promising:

ItDepends by Joe Berkovitz

AIR Link Report Visualizer by kahunaburger

h/t to Tim Walling for help on this

FLV That Stops When Seeking

Thursday, January 8th, 2009

A quick tip from Mr. Palumbo. If you’re trying to set up a scrubber for a video player in AS3, make sure there are key frames in the video file itself.

Seems pretty obvious. Just don’t tell me or Steve that.

Update: In response to SB’s comment, below…to be honest, we’re not totally sure how this file had no key frames. It came to us already encoded. So maybe (probably) we’re making this up as we go along? I was able to compress an FLV that was 900 frames long with a keyframe every 1000 frames. When I tried to seek, it would just stop. Why you would want to have such seldom keyframes, I’m not sure.