I am having a lot of trouble figuring out how I am going to access these buttons outside of the function which created them. If someone wouldn’t mind showing me how that would be great.
Even if someone could simply write a separate function that would trace the text on any of the buttons that would show me what i need to know.
Thanks in advance.
//BUTTON IN LIBRARY HAS LINKAGE NAME btn
function setBtn():void{
var myBtn:btn;
for(var i:Number=0;i<20;i++){
myBtn=new btn();
this.addChild(myBtn);
myBtn.name=“btn”+String(i);
myBtn.y=i15+(i2);
myBtn.txt.text = “stop”+i;
myBtn.index=i;
myBtn.alpha=0.7
trace(myBtn.txt.text);
}
}
setBtn();