Guest User

Untitled

a guest
Oct 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. package {
  2.  
  3. import flash.display.MovieClip;
  4. import flash.display.Shape;
  5.  
  6.  
  7. public class documentoMC extends MovieClip {
  8.  
  9.  
  10. public function documentoMC() {
  11. var micuadro:Shape = this.crearRectanguloRedondeado(0xFF0000, 90, 70, 10, 10);
  12. addChild(micuadro);
  13. micuadro.x = 100;
  14. micuadro.y = 100;
  15. }
  16.  
  17. //Crea un recuadro con bordes redondeados
  18. public function crearRectanguloRedondeado(color:uint, ancho:Number, alto:Number, anchoElipse:Number, altoElipse:Number):Shape
  19. {
  20. var my_shape:Shape = new Shape();
  21. my_shape.graphics.beginFill(color);
  22. my_shape.graphics.drawRoundRect(0, 0, ancho, alto, anchoElipse, altoElipse);
  23. my_shape.graphics.endFill();
  24. return my_shape;
  25. }
  26. }
  27.  
  28. }
Add Comment
Please, Sign In to add comment