I have a problem,
I use tweenmax in a website, and want to set the easing from xml but everything in the xml comes in flash as string and the easing must be a function. (or better: Class.function)
Anyone have a idea on how to set easing of tweenmax from xml? of is this just not possible with tweenmax and do i have to stick with tweener?
Thanks 
use getDefinitionByName to get the class from a String
use getDefinitionByName to get the class from a String
I tried that
but it does not work:
ReferenceError: Error #1065: Variable Elastic is not defined. at global/flash.utils::getDefinitionByName() at pages::HomePage/transitionIn() at com.gaiaframework.assets::PageAsset/transitionIn() at com.gaiaframework.core::TransitionController/pageIn() at com.gaiaframework.core::TransitionController/onTransitionInComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.gaiaframework.assets::PageAsset/onTransitionInComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.gaiaframework.templates::AbstractBase/transitionInComplete() at Function/http://adobe.com/AS3/2006/builtin::apply() at gs::TweenLite/complete() at gs::TweenLite/render() at gs::TweenLite$/updateAll()
doublepost…
use Elastic.easeIn
use Elastic.easeIn
Does the same, some things i also already tried:
this[“Elastic”]
[“Elastic”]
Class(“Elastic”)
var e:Class = “Elastic” as Class
gs.easing[“Elastic”]
import gs.easing.*;
var e:Class = getDefinitionByName("Elastic.easeOut") as Class;
import gs.easing.*; var e:Class = getDefinitionByName("Elastic.easeOut") as Class;
That is the same as: use Elastic.easeIn
returns the same error 
I wonder why tweenmax does it like this and not with a string?
import gs.TweenLite;
import gs.easing.*;
var elastic:Elastic;
var f:Function = (getDefinitionByName("gs.easing.Elastic") as Class)["easeInOut"];
TweenLite.to(t, 1.5, {x:300, time:1, ease:f, delay:1});
it works for me, but for some reason you must make a variable with “Elastic” type to make it work.
it works for me, but for some reason you must make a variable with “Elastic” type to make it work.import gs.TweenLite; import gs.easing.*; var elastic:Elastic; var f:Function = (getDefinitionByName("gs.easing.Elastic") as Class)["easeInOut"]; TweenLite.to(t, 1.5, {x:300, time:1, ease:f, delay:1});
Thanks
that works.
