Why will this code only trace strings?
The following code randomizes the array "doors". It works fine if the array is strings. However,
if I remove the quotation marks, it traces "[object Symbol1_1]" instead.
var doors:Array = [red_button, blue_button,yellow_button];
var randomDoors:Array = new Array(doors.length);
var randomPos:Number = 0;
for (var i:int = 0; i < randomDoors.length; i++)
{
randomPos = int(Math.random() * doors.length);
randomDoors = doors.splice(randomPos, 1)[0];
}
trace (randomDoors);
Tracing (randomDoors.name) returns the statement "undefined". How can I trace "doors" without converting the elements to strings?