Share Posted January 19, 2010 I had a friend give me the code below showing how to do this in AS3... but i'm struggling to figure it out in AS2 (i started learning only AS3). It makes sense to me, however I know that AS2 doesn't use "int"..so I have no clue how to get this to work. I want to declare an animation without a movieClip- and then whenever I wish to apply that animation to a certain MC i will tell it to do so. This is the AS3 version: import gs.TweenMax; tweenIt( box, 200, 150 ); function tweenIt( item:MovieClip, ex:int, why:int ) : void { TweenMax.to(item, .7, { x:ex, y:why }); } Link to comment Share on other sites More sharing options...
Share Posted January 19, 2010 import com.greensock.TweenMax; tweenIt( box, 200, 150 ); function tweenIt( item:MovieClip, ex:Number, why:Number ) : Void { TweenMax.to(item, .7, { x:Math.round(ex), y:Math.round(why) }); } Link to comment Share on other sites More sharing options...
Author Share Posted January 19, 2010 I don't think i've ever seen anyone respond to posts as quickly.. without flaming us beginners for not knowing code not even related to GS. I do not donate everywhere, but will be donating here, not there. Link to comment Share on other sites More sharing options...
Share Posted January 19, 2010 I don't think i've ever seen anyone respond to posts as quickly.. without flaming us beginners for not knowing code not even related to GS. I do not donate everywhere, but will be donating here, not there. Ha ha. No problem. Thanks for the kind words and your willingness to support the project. Cheers! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now