Open Flash CS4, create new AS3 FLA, add as3swf.swc and paste this on frame 1:
import com.codeazur.as3swf.SWF;
var swf:SWF = new SWF(root.loaderInfo.bytes);
trace(swf);
Trace output:
[SWF]
Header:
Version: 10
FileLength: 149405
FileLengthCompressed: 149405
FrameSize: (550,400)
FrameRate: 24
FrameCount: 1
Tags:
[69:FileAttributes] AS3: true, HasMetadata: false,
UseDirectBlit: false, UseGPU: false, UseNetwork: false
[09:SetBackgroundColor] Color: #FFFFFF
[86:DefineSceneAndFrameLabelData]
Scenes:
[0] Frame: 0, Name: Scene 1
[82:DoABC] Lazy: true, Length: 149219
[76:SymbolClass]
Symbols:
[0] TagID: 0, Name: Untitled_fla.MainTimeline
[01:ShowFrame]
[00:End]
Excercise: Draw something on stage, and run the code again.
Want more? Drop by my session Hacking SWF at FITC Amsterdam (Feb 22th, 16:00).
[Edit] Jim Cheng deserves credits. He was the one who whispered “root.loaderInfo.bytes” into my virtual ear on IM.