/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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");