Help creating a button and adding text inside it
Hi guys...
I am trying to create a button (or a MC, same thing) using only code, but it has to have what I need, inside...
var ins_btn: ?????
var ins:String = "How to play / Como jugar";
ins_btn.x = 202,75;
ins_btn.y = 316;
ins_btn.width = 533,30;
ins_btn.height = 59,35;
ins_btn.text = ins;
addChild(ins_btn);
I have tried that way, making ins_btn a MC, but it did not work (it did not show up in my screen) and I am doing that, so, when someone clicks on it, it goes to frame two:
ins_btn.addEventListener(MouseEvent.CLICK, instructionF);
function instructionF(event:MouseEvent):void {
ins_btn.removeEventListener(MouseEvent.CLICK, instructionF);
gotoAndStop(2);
}
So... What do I need to do to make this button or movieclip show up in the stage, with the words How to play / Como jugar inside it?
Thanks a lot!
