Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import flash.display.MovieClip;
- import flash.display.Shape;
- public class documentoMC extends MovieClip {
- public function documentoMC() {
- var micuadro:Shape = this.crearRectanguloRedondeado(0xFF0000, 90, 70, 10, 10);
- addChild(micuadro);
- micuadro.x = 100;
- micuadro.y = 100;
- }
- //Crea un recuadro con bordes redondeados
- public function crearRectanguloRedondeado(color:uint, ancho:Number, alto:Number, anchoElipse:Number, altoElipse:Number):Shape
- {
- var my_shape:Shape = new Shape();
- my_shape.graphics.beginFill(color);
- my_shape.graphics.drawRoundRect(0, 0, ancho, alto, anchoElipse, altoElipse);
- my_shape.graphics.endFill();
- return my_shape;
- }
- }
- }
Add Comment
Please, Sign In to add comment