Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Class Reference

0 views
Skip to first unread message

Michael Gioffredi

unread,
Feb 10, 2006, 11:20:30 PM2/10/06
to
I would like to be able to refer to a class with a string, but I can?t get it
to work with a variable.

For example, the following works:

var easing = mx.transitions.easing;

But this does not:

var string:String = "Bounce";
var easing = mx.transitions.easing;

What should I do differently?

NSurveyor

unread,
Feb 10, 2006, 11:43:42 PM2/10/06
to
I don't know why you need this, but simply put the following before your code:

mx.transitions.easing.Bounce;
mx.transitions.easing.Back;
mx.transitions.easing.Elastic;
mx.transitions.easing.Regular;
mx.transitions.easing.Strong;
mx.transitions.easing.None;

(take out the ones you don't plan on using)

Michael Gioffredi

unread,
Feb 10, 2006, 11:48:23 PM2/10/06
to
I?m building a component where the user will choose the type of ease. That way I would have to do a bunch of if/else or switch statements.

NSurveyor

unread,
Feb 11, 2006, 12:02:15 AM2/11/06
to
For example, at the very beginning of your code, put:


mx.transitions.easing.Bounce;
mx.transitions.easing.Back;
mx.transitions.easing.Elastic;
mx.transitions.easing.Regular;
mx.transitions.easing.Strong;
mx.transitions.easing.None;

Then, you should be able to use:

NSurveyor

unread,
Feb 11, 2006, 12:18:55 AM2/11/06
to
You're welcome.

Now if only somone would explain why that is necessary? Just taking a guess,
can be evaluated when compiling, but using can't. For some reason, it can't
evaluate these unknown variables until you make them known, simply by puting
them in code...? Myabe...

0 new messages