Ups, se me colo la funci�n redo que era de las pruebas, el c�digo final 
quedaria as�:

<code>
MovieClip.prototype.setOnPress = function(ref) {
        this.$onPress = ref;
};
MovieClip.prototype.getOnPress = function() {
        return this.onPress;
};
MovieClip.prototype.onEnterFrame = function() {
        this.$lapsus = 500;
        this.onEnterFrame = null;
};
MovieClip.prototype.onPress = function() {
        if (this.$dobleClick)
        {
                this.$timer = new Date().getTime();
                if (Math.abs(this.$firstTime-this.$timer)<=this.$lapsus)
                {
                        this.$onDobleClick();
                }
                else
                {
                        this.$firstTime = this.$timer;
                }
        }
        else
        {
                this.$onPress();
        }
};
MovieClip.prototype.getOnDobleClick = function() {
        return this.onDobleClick;
};
MovieClip.prototype.setOnDobleClick = function(ref) {
        this.$onDobleClick = ref;
        if (ref != null)
        {
                this.$dobleClick = true;
        }
        else
        {
                this.$dobleClick = false;
        }
};
MovieClip.prototype.addProperty("onDobleClick", this.getOnDobleClick, 
this.setOnDobleClick);
MovieClip.prototype.addProperty("onPress", this.getOnPress, this.setOnPress);
</code>

Y un ejemplo de uso ser�a:

<code>
prueba.onDobleClick = function() {
        trace("dobleClick");
        this.onDobleClick = null;
};
prueba.onPress = function() {
        trace("una s�la pulsaci�n");
};
</code>

Sixto

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a