/* Open a new FLash file (ActionScript 3.0). Select TimeLine --> Top Layer --> Frame 1 Select Window --> Actions (F9) Copy and paste this snippet Observe the Stage */ // Here we draw round rectangles. They make great buttons // the shape class. var myShape:Shape = new Shape(); myShape.graphics.lineStyle(2); myShape.graphics.beginFill(0xFF0000, 1); myShape.graphics.drawRoundRect(0, 0, 80, 18, 10, 10); addChild(myShape); // Using the Sprite class. var mySprite:Sprite = new Sprite(); mySprite.graphics.lineStyle(2); mySprite.graphics.beginFill(0x00FF00, 1); mySprite.graphics.drawRoundRect(100, 0, 80, 18, 10, 10); addChild(mySprite); // We create a rectangle using the MovieClip class. var otherShape:MovieClip = new MovieClip(); otherShape.graphics.lineStyle(1, 0x0000FF); otherShape.graphics.beginFill(0xFFDEAD); otherShape.graphics.drawRoundRect(200, 0, 80, 18, 10, 10); otherShape.graphics.endFill(); addChild(otherShape);