hola amigos del clab :D
Ok muchachos tengo un problema
hice un code para ventanitas la clase WINTANA xDDD
el problema es este
toda da bien a la perfección movimiento y todo ello
pero cuando agrego un componente cualquiera a libreria, ni lo uso solo esta en libreria ahí ocupando campo :crap: todo el code de mi clase WINTANA se arruina no hace lo que tenia que hacer
este es el dichoso código

Código :

class wintana {
   var ventana:MovieClip;
   static var clase:Object;
   var dib:MovieClip;
   function wintana() {
   }
   function crearVentana(type:String, nom:String, posx:Number, posy:Number):Void {
      ventana = _root.attachMovie('win', nom, _root.getNextHighestDepth());
      ventana.id = nom;
      ventana.titulo.text = nom;
      ventana._x = posx;
      ventana._y = posy;
      ventana.createEmptyMovieClip("container",20);
      ventana.container._y=20;
      clase = this;
      putPropertis();
      switch (type) {
      case 'mp3' :
         break;
      case 'Video' :
         break;
      case 'disco' :
         cargador("anexos/ScrollPane.swf");
         //crearScroll(100,100,'anexos/prueba.swf',ventana.container)
         loadMovie("ScrollPane.swf",ventana.container);
         break;
      case 'MSN' :
         break;
      }
   }
   function putPropertis():Void {
      ventana.barra.onPress = function() {
         this._parent.id = this._parent;
         this._parent.swapDepths(_root.getNextHighestDepth());
         clase.dibujar(this._parent);
         startDrag(clase.dib);
         this.ob = new Object();
         this.ob.id = this._parent;
         trace(this.ob.id);
         this.ob.onMouseUp = function() {
            stopDrag();
            this.id._x = clase.dib._x;
            this.id._y = clase.dib._y;
            //trace(this.id);
            removeMovieClip(_root["dibVen"]);
            Mouse.removeListener(this);
         };
         Mouse.addListener(this.ob);
      };
      ventana.cerrar.onRelease = function() {
         removeMovieClip(this._parent);
      };
      ventana.minimize.onRelease = function() {
         this._parent._visible = false;
      };
   }
   function cargador(ruta:String):Void {
      //ventana.container=new MovieClipLoader();
      var cargador:MovieClipLoader = new MovieClipLoader();
      var detector:Object = new Object();
      detector.onLoadStart = function() {
      };
      detector.onLoadProgress = function() {
      };
      detector.onLoadComplete = function() {
      };
      cargador.addListener(detector);
      cargador.loadClip(ruta, ventana.container);
   }
   function dibujar(ins:MovieClip):Void {
      var dateAux = new Date();
      dib = _root.createEmptyMovieClip("dibVen", _root.getNextHighestDepth());
      dib._x = ins._x;
      dib._y = ins._y;
      dib.lineStyle(1, 0xFF00FF, 100);
      dib.moveTo(0, 0);
      dib.lineTo(ins._width, 0);
      dib.lineTo(ins._width, ins._height);
      dib.lineTo(0, ins._height);
      dib.lineTo(0, 0);
      dib.endFill();
   }
}

Usar

Código :

var ventana=new wintana();
ventana.crearVentana("disco","MiPC",0,0);
ventana.crearVentana("disco","MiPC2",20,20);