Hey Guys,
the script below is scripted in AS1 and I want to change it into AS2.
the script checks if the mouse is doubleclicked.
I know in AS2 i have to get away of the prototype stuff but in this case im pretty dumb to it.
so is there anybody who can help me?
thnx.
mojave
Mouse.onMouseDown = function() {
if (this.last_click == undefined) {
this.last_click = 300;
}
if (getTimer()-this.last_click<300) {
this.broadcastMessage("$onDoubleClick");
}
this.last_click = getTimer();
};
Mouse.addListener(Mouse);
MovieClip.prototype.addProperty(“onDoubleClick”, function () {
return this.$onDoubleClick;
}, function (f) {
this.$onDoubleClick = f;
Mouse.addListener(this);
});
this.onDoubleClick = function() {
trace(“DoubleClick!”);
};