// Func checkDoubleClick [ use with MovieClip.prototype.onDoubleClick ]
function checkDoubleClick( theMovie, oneClick ) {
// andr3a - MX / MX 2004
var cTime = new Date();
var secondsTime = cTime.getMilliseconds() + (cTime.getSeconds()*1000);
var fromMovie = theMovie.doubleCheck[(theMovie.doubleCheck.length-1)];
if( fromMovie!="done" && Math.abs(fromMovie - secondsTime) >= 300 ) {
clearInterval(theMovie.intervalDC);
oneClick( theMovie );
}
else if( fromMovie=="done" ) {
clearInterval(theMovie.intervalDC);
}
}
// Proto double click
MovieClip.prototype.onDoubleClick = function(oneClick, twoClicks) {
// andr3a - MX / MX 2004 [ need checkDoubleClick function ]
var cTime = new Date();
var secondsTime = cTime.getMilliseconds() + (cTime.getSeconds()*1000);
if( this.doubleCheck == undefined || this.doubleCheck[(this.doubleCheck.length-1)]=="done") {
this.doubleCheck = new Array(secondsTime);
}
var difTime = Math.abs(this.doubleCheck[(this.doubleCheck.length-1)] - secondsTime);
if( difTime < 300 ) {
this.doubleCheck.push("done");
twoClicks( this );
}
else {
this.doubleCheck.push(secondsTime);
this.intervalDC = setInterval( checkDoubleClick, 20, this, oneClick );
}
}