Hello I am trying to create an array of buttons that I can click and then trace out the name of those buttons
This is what I have.
private function charList(event:ProgressEvent):void {
while(socket.bytesAvailable)
{
var str:String = this.socket.readUTFBytes(this.socket.bytesAvailable);
var numbers:String = str.split("\"").join("'");
// post my stat values :)
var val:Array = str.split("+|+");
var numberValues:Array=numbers.match(/(\d+)/ig);
if(val[0].toString().length == 0)
{
val[0] = "create";
}
Names = [val[0], val[5], val[10], val[15], val[20], val[25], val[30], val[35], val[40], val[45]];
for(var i:int = 0; i < Names.length; i++) {
cSel.chrNam.text = Names[i];
cSel.buttonMode = true;
cSel.x = 100;
cSel.y = 100 + i * 60;
addChild(cSel);
var e:MouseEvent;
cSel.addEventListener(MouseEvent.CLICK, selectCharacter);
}
}
}
how would I trace out the Names[i] value when triggering the selectCharacter function?