Hacking swf

8,400 views
8,272 views

Published on

A Brilliant presentation on the SWF file format by Claus Wahlers (@cwahlers)

Published in: Technology
1 Comment
9 Likes
Statistics
Notes
No Downloads
Views
Total views
8,400
On SlideShare
0
From Embeds
0
Number of Embeds
1,869
Actions
Shares
0
Downloads
88
Comments
1
Likes
9
Embeds 0
No embeds

No notes for slide

Hacking swf

  1. 1. Hacking SWF Claus Wahlers côdeazur brasil @cwahlers Sunday, 25. April 2010
  2. 2. SWF 10 Spec adobe.com/devnet/swf RTFM ! Sunday, 25. April 2010
  3. 3. as3swf github.com/claus/as3swf Low level ActionScript 3 class library to parse, create, modify and publish SWF files. Sunday, 25. April 2010
  4. 4. swfassist libspark.org/wiki/yossy/swfassist Low level ActionScript 3 class library to parse, create, modify and publish SWF files. Sunday, 25. April 2010
  5. 5. as3abc github.com/claus/as3abc Jim Cheng’s port of Joa’s ABC parser (from Joa’s excellent Apparat framework) Sunday, 25. April 2010
  6. 6. DEMO Sunday, 25. April 2010
  7. 7. SWF Anatomy The structure of a SWF SWF Header Signature Version File length Frame size Frame rate Frame count Tag Tag Tag Tag Sunday, 25. April 2010
  8. 8. SWF Anatomy The structure of a SWF SWF Header Signature Signature: Version File length ”FWS” - uncompressed Frame size ”CWS” - compressed Frame rate Frame count btw... “FWS” is “SWF” backwards Tag Tag Tag Tag Sunday, 25. April 2010
  9. 9. SWF Anatomy The structure of a SWF SWF Header Signature Version File length Frame size Frame rate Frame count For SWF 8 or later, FileAttributes the first tag must be the FileAttributes tag Tag Tag The last tag must be End the End tag Sunday, 25. April 2010
  10. 10. SWF Anatomy The structure of a SWF SWF Header Signature Version File length Frame size Frame rate Frame count Tag Unknown Tag Tag Tag Sunday, 25. April 2010
  11. 11. SWF Anatomy The structure of a tag Tag Header Type Length Tag Content Sunday, 25. April 2010
  12. 12. SWF Anatomy The structure of a tag Tag Header Type Length Tag Content When the Flash Player encounters a tag with an unknown type, it skips it Extensible Forward compatible Sunday, 25. April 2010
  13. 13. SWF Anatomy Data types used by SWF A tag’s content is made up of various data types. The exact format for each tag is defined in the SWF spec. Some of the data types are rather obscure: Integers Numbers Bit arrays Others UI8 FIXED UB[nBits] String UI16 FIXED8 SB[nBits] RGB UI24 FLOAT FB[nBits] RGBA UI32 FLOAT16 RECT SI8 DOUBLE MATRIX SI16 SI32 EncodedU32 Sunday, 25. April 2010
  14. 14. SWF Anatomy Data types used by SWF Example: RECT and bit arrays 01010 0000000000 1000100110 0000000000 0110010000 nBits xmin xmax ymin ymax 10 0 550 0 400 nBits specifies the minimum number of bits needed to represent all values in the array All values are stored as a bit stream (no byte boundaries) Sunday, 25. April 2010
  15. 15. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0 xmax 550 1000100110 ymin 0 0 ymax 400 110010000 Sunday, 25. April 2010
  16. 16. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0 xmax 550 1000100110 ymin 0 0 ymax 400 110010000 1110110110 nBits = 10 Sunday, 25. April 2010
  17. 17. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0000000000 xmax 550 1000100110 ymin 0 0000000000 ymax 400 0110010000 1110110110 nBits = 10 Sunday, 25. April 2010
  18. 18. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0000000000 xmax 550 1000100110 ymin 0 0000000000 ymax 400 0110010000 concatenate 0000000000 1000100110 0000000000 0110010000 Sunday, 25. April 2010
  19. 19. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0000000000 xmax 550 1000100110 ymin 0 0000000000 uses 40 + 5 bits ymax 400 0110010000 vs 128 bits 01010 0000000000 1000100110 0000000000 0110010000 Sunday, 25. April 2010
  20. 20. SWF Anatomy Data types used by SWF Example: RECT and bit arrays xmin 0 0 xmax 0 0 ymin 0 0 Special case: uses 0 + 5 bits ymax 0 0 vs 128 bits 00000 - - - - Sunday, 25. April 2010
  21. 21. SWF Tag Evolution SWF 10 defines a total of 64 different tags CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  22. 22. SWF Tag Evolution SWF 1 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  23. 23. SWF Tag Evolution SWF 2 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  24. 24. SWF Tag Evolution SWF 3 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  25. 25. SWF Tag Evolution SWF 4 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  26. 26. SWF Tag Evolution SWF 5 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  27. 27. SWF Tag Evolution SWF 6 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  28. 28. SWF Tag Evolution SWF 7 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  29. 29. SWF Tag Evolution SWF 8 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  30. 30. SWF Tag Evolution SWF 9 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  31. 31. SWF Tag Evolution SWF 10 CSMTextSettings DefineFont4 DefineText2 PlaceObject2 DefineBinaryData DefineFontAlignZones DefineVideoStream PlaceObject3 DefineBits DefineFontInfo DoABC Protect DefineBitsJPEG2 DefineFontInfo2 DoAction RemoveObject DefineBitsJPEG3 DefineFontName DoInitAction RemoveObject2 DefineBitsJPEG4 DefineMorphShape EnableDebugger ScriptLimits DefineBitsLossless DefineMorphShape2 EnableDebugger2 SetBackgroundColor DefineBitsLossless2 DefineScalingGrid End SetTabIndex DefineButton DefineSceneAnd... ExportAssets ShowFrame DefineButton2 DefineShape FileAttributes SoundStreamBlock DefineButtonCxform DefineShape2 FrameLabel SoundStreamHead DefineButtonSound DefineShape3 ImportAssets SoundStreamHead2 DefineEditText DefineShape4 ImportAssets2 StartSound DefineFont DefineSound JPEGTables StartSound2 DefineFont2 DefineSprite Metadata SymbolClass DefineFont3 DefineText PlaceObject VideoFrame Sunday, 25. April 2010
  32. 32. SWF Tag Families Definition tags define the SWF’s content assign a unique character id characters are stored in dictionary for use/reuse DefineShape DefineButton DefineSprite DefineBits DefineFont DefineText DefineSound DefineVideoStream Sunday, 25. April 2010
  33. 33. SWF Tag Families Control tags control the flow of the SWF create/manipulate instances of objects from the dictionary PlaceObject RemoveObject ShowFrame Sunday, 25. April 2010
  34. 34. The Flow A simple example SWF Dictionary Display list DefineShape Empty Empty ID 1 DefineSprite ID 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  35. 35. The Flow A simple example SWF Dictionary Display list DefineShape Shape Empty ID 1 ID 1 DefineSprite ID 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  36. 36. The Flow A simple example SWF Dictionary Display list DefineShape Shape Empty ID 1 ID 1 DefineSprite Sprite ID 2 ID 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  37. 37. The Flow A simple example SWF Dictionary Display list DefineShape Shape Shape ID 1 ID 1 at depth 1 DefineSprite Sprite ID 2 ID 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  38. 38. The Flow A simple example SWF Dictionary Display list DefineShape Shape Shape ID 1 ID 1 at depth 1 DefineSprite Sprite Sprite ID 2 ID 2 at depth 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  39. 39. The Flow A simple example SWF Dictionary Display list DefineShape Shape Shape ID 1 ID 1 at depth 1 DefineSprite Sprite Sprite ID 2 ID 2 at depth 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 1 ShowFrame Sunday, 25. April 2010
  40. 40. The Flow A simple example SWF Dictionary Display list DefineShape Shape Shape ID 1 ID 1 at depth 1 DefineSprite Sprite Sprite ID 2 ID 2 at depth 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 2 ShowFrame Sunday, 25. April 2010
  41. 41. The Flow A simple example SWF Dictionary Display list DefineShape Shape Shape ID 1 ID 1 at depth 1 DefineSprite Sprite ID 2 ID 2 PlaceObject ID 1 at depth 1 PlaceObject ID 2 at depth 2 ShowFrame RemoveObject from depth 2 ShowFrame Sunday, 25. April 2010
  42. 42. The FileAttributes tag Defines some characteristics of the SWF file [69:FileAttributes] AS3: true HasMetadata: true UseDirectBlit: false UseGPU: false UseNetwork: true Sunday, 25. April 2010
  43. 43. The ScriptLimits tag Defines some characteristics of the SWF file [65:ScriptLimits] MaxRecursionDepth: 1000 ScriptTimeoutSeconds: 60 Sunday, 25. April 2010
  44. 44. The ProductInfo tag Compile time/date, info about compiler used [41:ProductInfo] ProductID: 3 Edition: 6 Version: 4.0.0.14159 CompileDate: Wed Apr 21 03:23:16 GMT-0400 2010 ProductID (UI32) 0: Unknown 1: Macromedia Flex for J2EE 2: Macromedia Flex for .NET 3: Adobe Flex Edition (UI32) 0: Developer Edition 1: Full Commercial Edition 2: Non Commercial Edition 3: Educational Edition 4: Not For Resale (NFR) Edition 5: Trial Edition 6: None Sunday, 25. April 2010
  45. 45. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,125,15,125, EdgeBounds: 20,120,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,20, FillStyle1: 1, LineStyle: 1 [SWFShapeRecordStraightEdge] Vertical: 100 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordEnd] Sunday, 25. April 2010
  46. 46. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,125,15,125, EdgeBounds: 20,120,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,20, FillStyle1: 1, LineStyle: 1 [SWFShapeRecordStraightEdge] Vertical: 100 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordEnd] Shape records are NOT drawing instructions! They merely DEFINE the styles and geometry of the shape! Sunday, 25. April 2010
  47. 47. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  48. 48. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  49. 49. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  50. 50. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  51. 51. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  52. 52. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  53. 53. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  54. 54. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  55. 55. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  56. 56. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  57. 57. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  58. 58. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  59. 59. The DefineShape tag So what about those two FillStyles?! Sunday, 25. April 2010
  60. 60. The DefineShape tag So what about those two FillStyles?! Sunday, 25. April 2010
  61. 61. The DefineShape tag So what about those two FillStyles?! FillS tyle 1 FillS tyle 0 Sunday, 25. April 2010
  62. 62. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  63. 63. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  64. 64. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  65. 65. The DefineShape tag Defines styles and geometry of a shape [83:DefineShape4] ID: 1, ShapeBounds: 15,175,15,125, EdgeBounds: 20,170,20,120 FillStyles: [1] [SWFFillStyle] Type: 0 (solid), Color: FF0000 [2] [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles: [1] [SWFLineStyle2] Width: 10, Color: 000000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 120,45, FillStyle1: 2, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStyleChange] FillStyle1: 1 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStraightEdge] Horizontal: -100 [SWFShapeRecordStraightEdge] Vertical: -100 [SWFShapeRecordStraightEdge] Horizontal: 100 [SWFShapeRecordStraightEdge] Vertical: 25 [SWFShapeRecordStyleChange] FillStyle0: 2 [SWFShapeRecordStraightEdge] Horizontal: -50 [SWFShapeRecordStraightEdge] Vertical: 50 [SWFShapeRecordStraightEdge] Horizontal: 50 [SWFShapeRecordEnd] Sunday, 25. April 2010
  66. 66. DEMO Sunday, 25. April 2010
  67. 67. Thanks! Claus Wahlers côdeazur brasil claus@codeazur.com.br Blog wahlers.com.br/claus/blog GitHub github.com/claus Twitter @cwahlers Sunday, 25. April 2010

×