Selected.as

  1. /**
  2.  * Apunta a la opción bajo el ratón
  3.  *
  4.  * ProInf.net, 2008
  5.  * GNU General Public License: http://creativecommons.org/licenses/GPL/2.0/deed.es
  6.  *
  7.  */
  8. class Selected extends Clip {
  9.  
  10. //////////////////////////////////////////////////
  11. // Propiedades de la clase
  12.  
  13. private static var selected:Selected = null;
  14.  
  15. //////////////////////////////////////////////////
  16. // Constructor
  17.  
  18. private function Selected (movieClip:MovieClip) {
  19. super(movieClip);
  20. }
  21.  
  22. public static function getInstance():Selected {
  23. if (selected == null) {
  24. var mc:MovieClip = _root.attachMovie("selected", "selected1", 100000);
  25. selected = new Selected(mc);
  26. trace("Selected get instance");
  27. }
  28. return selected;
  29. }
  30.  
  31. //////////////////////////////////////////////////
  32. // Destructor
  33.  
  34. /** Free resources. Call manually just before delete this class */
  35. public function die() {
  36. selected = null;
  37. super.die();
  38. }
  39.  
  40. //////////////////////////////////////////////////
  41. // Getters
  42.  
  43. //////////////////////////////////////////////////
  44. // Setters
  45.  
  46. public function setLocation(x:Number, y:Number) {
  47. super.setLocation(x, y);
  48. Animatron.moveSelected(this, x, y);
  49. }
  50. public function setVisible(valor:Boolean) {
  51. super.setVisible(valor);
  52. }
  53.  
  54. //////////////////////////////////////////////////
  55. // Métodos públicos
  56.  
  57.  
  58. //////////////////////////////////////////////////
  59. // Métodos propios
  60.  
  61. }

Proinf.net