Ups, no lo mand� a la lista. Mil perdones.

-----Mensaje original-----
De: Manuel de la Higuera [mailto:[EMAIL PROTECTED] 
Enviado el: viernes, 24 de octubre de 2003 14:41
Para: 'Eva del Campo'
Asunto: RE: [ASNativos] Doble click


Se me ha olvidado eso del hitTest, tienes raz�n :)

No tengo demasiado tiempo --putos deadlines-- y est� escrito sin el IDE
delante. Para hacerlo de forma que no tengas que inicializar el
movieClip tendr�as que definir una nueva propiedad. No lo he hecho por
no meter la pata pero creo recordar que se hac�a as� (ya le he puesto el
hitTest):

---8<---
MovieClip.prototype.$doubleClickSetter = function (event) {
        this.$onDoubleClick = new Object();
        this.$onDoubleClick.$mcRef = this;
        this.$eventDoubleClick = event;
        this.$onDoubleClick.onMouseDown = function() {
                if (hitTest(_xmouse,_ymouse)) {
                        if ((getTimer() - this.$timer) <= 200 &&
this.$timer != undefined) {
                                this.$mcRef.$eventDoubleClick();
                        }
                        this.$timer = getTimer();       
                }
        }
        Mouse.addListener(this.$onDoubleClick);
}

MovieClip.prototype.$doubleClickGetter = function () {
        return this.$eventDoubleClick;
}

MovieClip.prototype.addProperty("onDoubleClick",
                                          this.$doubleClickGetter,
                                          this.$doubleClickSetter);
---8<---


Pru�balo y me comentas.

<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a