RIA Developer, Flex / Flash, Widgets
Tip of the Day – Flipping Display Objects
The tip that helped me the most lately is the with flipping objects with the help of matrices.
Here is the code:
function flip( display:DisplayObject, orientation:String ):void { var m:Matrix = display.transform.matrix; switch (orientation.toUpperCase()) { case "HORIZONTAL" : m.a = -1; m.tx = display.width + display.x; break; case "VERTICAL" : m.d = -1; m.ty = display.height + display.y; break; } display.transform.matrix = m; } flip(logo, "horizontal");
This tip was provided by Sidney K. Thanks Sidney!
| Print article | This entry was posted by Nate Beck on February 5, 2009 at 9:30 pm, and is filed under Actionscript, Tip of the day. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

about 1 year ago
Cool to see my tip on your site, thanks for placing
Keep up the cool tips!
Sid