Que error hay en este code?� esque no me funciona

function localizador() {
 this.addProperty("actualItem", this.getActualItem, this.setActualItem);
 this.__actualItem__ = null;
}

localizador.prototype = new MovieClip();

localizador.prototype.init = function() {
 var i = int(this.localizadorFor.length);
 while(i--) {
  eval(this.localizadorFor[i]).localizador  = this;
 }
}

localizador.prototype.setActualItem = function(item) {
 this.__actualItem__.volver.call(this.__actualItem__);
 this.__actualItem__ = item;
 this.__actualItem__.mostrar.call(this.__actualItem__);
}

localizador.prototype.getActualItem = function() {
 return this.__actualItem__;
}

function Item() {
 this.initX   = this._x;
 this.initY   = this._y;
 
 this.t       = new Number();
 this.NFrames = new Number();
}

item.prototype = new MovieClip();

item.prototype.mostrar = function() {
 delete this.onEnterFrame;
 this.t       = 0;
 this.NFrames = 15;
 this.endX    = 50
 this.endY    = 50;
 
 
 this.dX      = -(this._x - this.endX);
 this.dY      = -(this._y - this.endY);
 
 this.x       = this._x;
 this.y       = this._y;
 this.reposition();
}

item.prototype.volver = function() {
 delete this.onEnterFrame;
 
 this.t       = 0;
 this.NFrames = 15;
 
 this.dX      = -(this._x - this.initX);
 this.dY      = -(this._y - this.initY);
 
 this.x       = this._x;
 this.y       = this._y;
 this.reposition();
}

item.prototype.reposition = function() {
 this.onEnterFrame = function() {
  if(this.t++ < this.NFrames) {
   this._x += (this.x - this.dX)/4;
   this._y += (this.y - this.dY)/4;
  } else {
   this.t = 0;
   delete this.onEnterFrame;
  }
  
 }
}

item.prototype.onRelease = function() {
 this.localizador.setActualItem(this);
}

Object.registerClass("boton1", item);
Object.registerClass("boton2", item);
Object.registerClass("localizador", localizador);

y los MC estan linkados ....
Iv�n Rodriguez Espada
_________________________
ALAPLAYA.COM
http://www.alaplaya.com
[EMAIL PROTECTED]
<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a