Posted by Sankar.G | Posted in AS3 | Posted on 11:42 PM
we can create a rectangle or cirlcle using Action Script 3.0
AS3.0
Code
var rect:Shape=new Shape();
rect.graphics.beginFill(0x00FFFF);
rect.graphics.drawRect(75,300,175,75);
addChild(rect);
var cir:Shape=new Shape();
cir.graphics.beginFill(0x00FFFF);
cir.graphics.drawCircle(0,0,40);
cir.x=40;
cir.y=40;
addChild(cir);
var tx:TextField=new TextField();
tx.type=TextFieldType.INPUT;
tx.text="sankar";
addChild(tx);
Syntax
drawRect(x,y,width,height);
drawCircle(x,y,radius);
AS3.0
Code
var rect:Shape=new Shape();
rect.graphics.beginFill(0x00FFFF);
rect.graphics.drawRect(75,300,175,75);
addChild(rect);
var cir:Shape=new Shape();
cir.graphics.beginFill(0x00FFFF);
cir.graphics.drawCircle(0,0,40);
cir.x=40;
cir.y=40;
addChild(cir);
var tx:TextField=new TextField();
tx.type=TextFieldType.INPUT;
tx.text="sankar";
addChild(tx);
Syntax
drawRect(x,y,width,height);
drawCircle(x,y,radius);
Comments (0)
Post a Comment