Need class to be variableized ; )
No matter how I revisit my application, I cannot find a simple way to:
var thisOne:myVariable = new myVariable;
where myVariable is a name of one of my sprites in my library. I considered creating a class myVariable and rewriting the above line as
var thisOne:myVariable = new myVariable(spriteName);
but then I run into the same problem internally
...
public function myVariable(s:String):void {
var thisOne:String = new String; <<<<<<<<<------ this obviously does not work and resembles the above only one step removed.
}
Everytime I think I figured it out using arrays, I end up with only one instantiation being referenced multiple times. Understandable since arrays access by reference. So how about it?
A little background in case my approach is orthogonal to best practice (i.e. I'm totally whack).
In each lesson I may create hundreds of identical Sprites that are displayed so the student can count or subquan them.
Followup lessons are similar except for the quantity and the Sprite. Therefore, I only need to pass the variables quantity and Sprite (which are sometimes animated) to my program. But I can not figure out to instantiate the Sprite via a variable or string reference.
I hope I didn't miss the obvious in the on-line Adobe references or that my web searches are brain-dead so please bear with me (and, if possible, bear me up.)
