Share Posted April 27, 2012 I'm not sure if this question is more related to greensock or to action script 3 in general, but it is related to working with greensock libraries so I think somebody may gain something from it if I ask it here. Is it possible to give as an argument not only how to tween, but also what to tween? To show what I mean by using pseudocode: var name = x; var value = 100; var pair = name:value; TweenMax.to(object, 1, { pair }); Is something like that somehow possible? Regards! Link to comment Share on other sites More sharing options...
Share Posted April 27, 2012 I think this is what you're looking for: var vars:Object = {}; //this will eventually hold our name/value pair var name:String = "x"; var value:Number = 100; vars[name] = value; TweenMax.to(object, 1, vars); Link to comment Share on other sites More sharing options...
Author Share Posted April 27, 2012 Thank you very much, I was looking just for that . 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