Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Changing the type of easy with a variable name?

Recommended Posts



I am wondering if it is possible to assign the type of easing with a variable name. I will have to be able to change the tween type in multiple place at the same time. I always did it using MCTween but encounter problem doing the same with MaxLite.


Here what I have.

import gs.*;
import gs.easing.*;

var animType:String = "Elastic.easeInOut"; // assign a variable for the easing type

//Run the TweenLite
TweenLite.to(mc, 1, {_x:72, _y:121, _xscale:120, _yscale:140, _rotation:45, _alpha:50, ease:animType});

Obviously, It is not working. I am wondering if I set it up in a wrong way or there is another way to do the same.

Thank you in advance.

Link to comment
Share on other sites

Don't type the variable, for instance:


var animType = Elastic.easeInOut; // assign a variable for the easing type

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.