flex - How to rotate MXML component round its center like a wheel respectfully to mouse? -


Then I have that panel or any other mxml component I would somehow rotate it like a wheel of a car whose Along you run it ... take a ... like a bop when the mousebutton is down, it captures the component ... when you move the mouse component (not moves) according to the position of the new mouse ... How does the MXML component rotate like a circle towards its center, on which the mouse should be identified?

Feel free to edit this question well because I know I have prepared it badly ...

Add these to the utility class if you do not want to add dependencies on fl.motion. *

  / ** * Moves inside a defined point of the matrix, the change of place * This can be used to rotate a film clip around a change point . * * @ Ultimate M. A matrix example * * @ * x coordinate of the ultimate x point * * @ y coordinate of the ultimate y point * * @ angle of rotation in the ultimate angle degree degree. * PlayerVersion Flash 9.0.28.0 * @ LingWarzon 3.0 * @ Keyword Matrix, Transcript Motion @see flash.geom.Matrix * / Public static function rotate in the form of action scriptRadineInterness (m: matrix, x: number, y: number, angle degree : Number): zero {var point: point = new point (x, y); Point = m.transformpoint (point); M.tx - = point.x; MTI - = dot.a; M.rotate (angleDegrees * (Math.PI / 180)); M.tx + = point.x; M.T.I. = Dot.a; } / ** * A matrix changes the fixed point out of the transform space of the matrix. * It can be used to rotate a movie clip around a change point of its origin. * * @ Ultimate M. A matrix example * * @ * x coordinate of the ultimate x point * * @ y coordinate of the ultimate y point * * @ angle of rotation in the ultimate angle degree degree. * PlayerVerification Flash 9.0.28.0 * @ Lingwestern 3.0 * @ Keyword Matrix, copying copy as action script @see flash.geom.matrix * / public static function rotateAroundExternalPoint (m: matrix, x: number, y: number, angle degree : Number): zero {m.tx - = x; MTI - = y; M.rotate (angleDegrees * (Math.PI / 180)); M.tx + = x; M .t + = y; }  

These Matrix Transformers and

These will be for 2D look for 3D.

Do not forget to check whether the layout has been updated correctly or not.

HH


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -