UPDATED ANSWERED: Found a WORK AROUND. I changed my array to an array of mc names rather than strings so it works now. Nevertheless, curious if this question could be answered.
I have a random array of string names. I sort them out randomly. But I need to add an existing movieclip based the string name.
Here is what I have that doesn't work.
public function addToStage()
{
Happy = sorted.sort( randomize );
trace("First is: " +Happy[0]); /// Works!
addChild(Happy[0]); // Does not work
}
ERROR I GET TypeError: Error #1034: Type Coercion failed: cannot convert "Apple" to flash.display.DisplayObject. at Main/addToStage()[C:etc..\Main.as:74] at Main/init()[C: etc...\Main.as:64] at Main()[C: etc... \Main.as:25]