I want to make a mc based on a variable tht i get from the mousewheel function.
currGun = gunList[gunOper]
removeChild(iGun);
if(currGun=="SCAR_GUN_mc"){
iGun = new SCAR_GUN_mc;
} else if (currGun=="SPAS12_GUN_mc"){
iGun = new SPAS12_GUN_mc;
} else if (currGun=="BARRET_GUN_mc"){
iGun = new BARRET_GUN_mc;
}
addChild(iGun);
So what im doing here is removing a mc and making another one based on a variable but this looks like a very slow and ineffetive way of doing this. I was hoping the i could just say something like iGun = new currGun but this doesnt work does anyone know of a more efficant way of doing this?
Thanks kirupians:thumb: