Amy,

 

Did you import the easing functions? (ie. import mx.effects.easing.*). I
think you'll also have to create dummy variables of each class. These
classes won't be linked into the swf unless you perform these steps.
GetDefinitionByName will only return a result if the class is linked in.


 

Jason

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Monday, November 26, 2007 9:09 AM
To: [email protected]
Subject: [flexcoders] Dynamically Changing Easing Function Again

 

I am trying to create an easing function explorer to be able to compare 
the existing easing functions. However, I am having a problem with the 
syntax to change out the function at runtime. I feel like I am really 
close here, but I am at a loss as to what else to try. Here is the 
function I am using.

private function onListChange(e:Event):void {
easingFunction = e.target.selectedItem.label;
goToBottom.easingFunction = getDefinitionByName
("mx.effects.easing."+easingFunction).easeIn;
goToTop.easingFunction = getDefinitionByName
("mx.effects.easing."+easingFunction).easeIn;
}

 

Reply via email to