I need to be able to insert an object in my library to the stage. They are all different .jpg that have been properly imported and have AS Linkage names like GIS_1 GIS_2 etc.
I am trying to run a function to import them one at a time depending on an external variable.
example:
var GIS_Image = new GIS_#(); //the "#" needs to change as depending on a counter
addChild(GIS_Image);
but what I need is to be able to put the name "GIS_1" as a variable so i can have something that allows it to change every time I need a new picture. my first thought was to make a string along the lines of:
var counter:int = 2;
var test:String = ("GIS_"+count);
var circle = new test();
but it wont work because it is looking for an object names test rather than the accessing the string that text makes up.
any ideas?
THANKS!