FLVPlayback Component Tip

For this job I’m working on, I was wondering why some of my thumbnails were loading so slowly, so I opened up the Activity Window in Safari and discovered that an FLV was the culprit. Even after unloading the SWF that contains the FLVPlayback component, Flash was still loading the FLV in memory. I was somewhat familiar with the quirky behavior of FLVs before: for example the sound will keep playing even after you remove the component, which I’ve always gotten around by calling SoundMixer.stopAll().

Unfortunately, there’s no unload() method for the FLVPlayback component, and while setting the source property to null or “” does unload the FLV, it also results in errors. I was all set to dynamically add a new Video object to the FLVPlayback, then remove the original Video object, which seems like an awful lot of overhead for something that should be so simple, when I remembered the old blank SWF trick from previous versions of Flash (when unloading SWFs was less than reliable, loading a blank SWF would do the trick). So I created a blank, one-frame QuickTime and converted it into an FLV, then when I want to unload an FLV from my player, I just load in this blank FLV (<2K) instead. Works perfectly.

Right-click to download blank.flv

Comments

Back on the Market

Comments

Seesaw Studios Site Redesign

Comments

The Greatest Song of All Time

Comments

World’s Cutest Baby Girl

Comments

My Own iTunes Coverflow Rip-Off

Comments

Four-Time Near-Winner

Comments (6)

Goodnight Forest Moon

Comments

Oh, the Iron-y

Comments (2)

Flashing the Iron

Comments