Platform : Flash CS3, AS3
Hi, I hope this will be an easy problem for some of you.
I have a variable (easeType) sat in a Class called dragClip
it’s set within the class like so;
public var easeType:Function = Elastic.easeOut;
this variable changes the type of easing of the class when it uses a tweening method.
I want to use a comboBox on the Stage to change the value of this variable, so that the class eases in the way specified by the comboBox. I have it populated with options like Bounce.easeOut and Strong.easeOut
On the timeline, I have this code;
function changeHandler(e:Event):void {
var cb:ComboBox = e.currentTarget as ComboBox;
var fn:Function = getDefinitionByName(cb.selectedLabel] as Function ;
dragClip.easeType = fn;
}
easePicker.addEventListener(Event.CHANGE, changeHandler);
Unfortunately, when I select anything in the comboBox, I get this error;
ReferenceError: Error #1065: Variable easeOut is not defined.
at global/flash.utils::getDefinitionByName()
I assume the problem is because of the dot between (for example) Strong and easeOut but I don’t really know where to go from here.