creating button
Posted
by eomer
on Stack Overflow
See other posts from Stack Overflow
or by eomer
Published on 2010-04-27T11:51:01Z
Indexed on
2010/04/27
11:53 UTC
Read the original article
Hit count: 250
actionscript-3
hi I started to learn as3 using fdt i managed to put texts on screen now i want to show the text after the button is clicked but the button does not appear
here is the code
` package { import flash.events.MouseEvent; import flash.media.Camera; import mx.controls.Button; import flash.display.Sprite; import flash.text.TextField;
public class test2 extends Sprite
{
private var tField:TextField;
public function click(e:MouseEvent):void
{
tField = new TextField();
tField.text="ffff";
addChild(tField);
}
public function test2():void
{
var aa:Button=new Button();
aa.label="deneme";
aa.x=100;
aa.y=200;
aa.addEventListener(MouseEvent.CLICK, click)
}
}
}
`
help me pleaseee
© Stack Overflow or respective owner