I have an array, which are the literal names of class references. Eg. in my main class I have
var page1:PageOne = new PageOne();
var page2:PageTwo = new PageTwo();
var page3:PageThree = new PageThree();
var sectionsArray = new Array ('page1', 'page2', 'page3')
What I'd like to write, but can't is:
var sectionsArray = new Array (page1, page2, page3)
I am trying to tween something based on these values, but since the value is of type String, I cannot associate these values with the class references they represent. So I tried something like:
var tweenObj:Object = _sectionsArray[0] as Object
TweenLite.to(tweenObj, 1, {alpha:0});
But all this does is make it an Object of type String (and throw a tweenLite error because i tried to tween a string), which does not help me.
What is a better way to think about handling what I'm trying to do?
Thanks very much in advance!!