I’m trying to create a function that will allow me to place any symbol in the library on the stage. I’m getting hung up on the second line of the function. I am not having a problem with the script to place a specific instance on the stage, but I want to be able to pass the symbol, and the destination coordinates to the symbol. I’m quite new, and I know there is something I am not understanding about instantiating an object.
function PlaceSymbolFromLibrary(getSymbolClass,position_x,position_y) {
var NewSymbolInstance:getSymbolClass = new doingSomethingWrongInThisLine;
NewSymbolInstance.x = (position_x);
NewSymbolInstance.y = (position_y);
addChild(NewSymbolInstance);
}
function PlaceGroupOfSymbols() {
PlaceSymbolFromLibrary(mySymbol,100,100);
}
PlaceGroupOfSymbols();
Any help would be very much appreciated