Filling a Shape with a Solid or Translucent Color
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var sampleSprite:Sprite = new Sprite();
sampleSprite.graphics.lineStyle( );
sampleSprite.graphics.beginFill(0x00FF00);
sampleSprite.graphics.lineTo(100, 0);
sampleSprite.graphics.lineTo(100, 100);
sampleSprite.graphics.lineTo(0, 100);
sampleSprite.graphics.lineTo(0, 0);
sampleSprite.graphics.endFill( );
addChild(sampleSprite);
}
}
}
Related examples in the same category