Con tu m�todo (en su estado actual) me surgen varios problemas:
-No me funcionan los eventos onPress
-Si asigno un evento onEnterFrame a un clip, �ste deja de responder a
onDobleClick (y sigue sin responder a onPress).
-Todos los clips se comportan como botones (cambia el cursor al hacer
rollover) aunque no tengan eventos de rat�n asociados (debido a tu
definici�n de onPress).
xxxx
Eva
> Siento ser tan pesado, pero queda completo ya cuando se le a�ade la propiedad
> lapsus para controlar el tiempo que ha de transcurrir entre cada pulsaci�n, en
> segundos claro:
> <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.setLapsus = function (ref) {
> this.$lapsus = ref;
> }
> MovieClip.prototype.getLapsus = function (ref) {
> return this.$lapsus;
> }
> 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);
> MovieClip.prototype.addProperty("lapsus", this.getLapsus, this.setLapsus);
> </code>
>
> Y creo que ya no le falta nada.
>
> Sixto
<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->