{"id":151,"date":"2010-02-06T19:58:10","date_gmt":"2010-02-06T21:58:10","guid":{"rendered":"http:\/\/wahlers.com.br\/claus\/blog\/?p=151"},"modified":"2010-07-22T15:23:26","modified_gmt":"2010-07-22T18:23:26","slug":"swftrospection","status":"publish","type":"post","link":"http:\/\/wahlers.com.br\/claus\/blog\/swftrospection\/","title":{"rendered":"SWFtrospection"},"content":{"rendered":"<p>Open Flash CS4, create new AS3 FLA, add <a href=\"http:\/\/github.com\/claus\/as3swf\/blob\/master\/bin\/as3swf.swc\">as3swf.swc<\/a> and paste this on frame 1:<\/p>\n<pre><code>import com.codeazur.as3swf.SWF;\r\nvar swf:SWF = new SWF(root.loaderInfo.bytes);\r\ntrace(swf);<\/code><\/pre>\n<p>Trace output:<\/p>\n<pre><code>[SWF]\r\n  Header:\r\n    Version: 10\r\n    FileLength: 149405\r\n    FileLengthCompressed: 149405\r\n    FrameSize: (550,400)\r\n    FrameRate: 24\r\n    FrameCount: 1\r\n  Tags:\r\n    [69:FileAttributes] AS3: true, HasMetadata: false, \r\n      UseDirectBlit: false, UseGPU: false, UseNetwork: false\r\n    [09:SetBackgroundColor] Color: #FFFFFF\r\n    [86:DefineSceneAndFrameLabelData] \r\n      Scenes:\r\n        [0] Frame: 0, Name: Scene 1\r\n    [82:DoABC] Lazy: true, Length: 149219\r\n    [76:SymbolClass] \r\n      Symbols:\r\n        [0] TagID: 0, Name: Untitled_fla.MainTimeline\r\n    [01:ShowFrame] \r\n    [00:End]<\/code><\/pre>\n<p>Excercise: Draw something on stage, and run the code again.<\/p>\n<p>Want more? Drop by my session <a href=\"http:\/\/www.fitc.ca\/events\/presentations\/presentation.cfm?event=101&#038;presentation_id=1078\">Hacking SWF<\/a> at <a href=\"http:\/\/www.fitc.ca\/events\/about\/?event=101\">FITC Amsterdam<\/a> (Feb 22th, 16:00).<\/p>\n<p>[Edit] <a href=\"http:\/\/twitter.com\/jimcheng\">Jim Cheng<\/a> deserves credits. He was the one who whispered &#8220;root.loaderInfo.bytes&#8221; into my virtual ear on IM.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: &hellip; <a href=\"http:\/\/wahlers.com.br\/claus\/blog\/swftrospection\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,4,12],"tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category-as3","category-flash","category-swf"],"_links":{"self":[{"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/comments?post=151"}],"version-history":[{"count":5,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":196,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/posts\/151\/revisions\/196"}],"wp:attachment":[{"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/media?parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/categories?post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wahlers.com.br\/claus\/blog\/wp-json\/wp\/v2\/tags?post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}