Posts Tagged ‘elastic’
Claus Wahlers has a great post on some lower level Flash handling for shapes. He posts about a tool called as3swf which helps to look into the raw shapes and vector drawing calls in the flash engine.
The output of this tool gives the raw machine code/assembly like procedural output that is very similar to other rendering engines. It actually makes me think of OpenGL a bit in the output switch based, procedural flow except this if for vector drawing rather than raster.
[83:DefineShape4] ID: 1 FillStyles:  [SWFFillStyle] Type: 0 (solid), Color: 666666 LineStyles:  [SWFLineStyle2] Width: 200, Color: ff0000 ShapeRecords: [SWFShapeRecordStyleChange] MoveTo: 400,400, FillStyle1: 1, LineStyle: 1 [SWFShapeRecordStraightEdge] Horizontal: 2000 [SWFShapeRecordStraightEdge] Vertical: 2000 [SWFShapeRecordStraightEdge] Horizontal: -2000 [SWFShapeRecordStraightEdge] Vertical: -2000 [SWFShapeRecordEnd]
It is always good to know what is going on in lower levels to better code for projects that perform well. Another great post on this is the Elastic Racetrack of the AS3 and AVM2 virtual machine which describes how the AVM2 handles drawing those low level shape calls in addition to handling script.
- Check out that and more at Craftymind like some other good stuff like garbage collection in AIR with actionscript 3 (as3) and serializing classes to files in AIR with AS3
- Original ‘Elastic Racetrack’ Post by Ted on Flex in 2005