This Blog contains About Action script 3.0 Variables, Data types, Access specifies, Keywords, Operators, Conditional statements, Control statements, Arrays (Indexed, Associative, Multidimensional, Cloning), Functions, Symbols, Movie clips (Transformation point, Registration point, Loading images), Buttons, Events (Key board, Mouse, Timer, XML)Pre- defined function :- Random, Hit test object, Drag and drop, Sort, Loader, Tween,URL Loader, Video components, Audio Components, Sound Channel.
Friday, 8 March 2013
rotate a object z axis
Code :-
=====
var startingAngle:Number = 45;
var gravity:Number = 0.1;
var currentForce:Number = 0;
arrow.rotationX = startingAngle;
stage.addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void
{
currentForce -= arrow.rotationX / (gravity * 1500);
arrow.rotationX += currentForce;
}
Out put :-
======
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment