1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
attachMovie( "button", "button5", 5 );
_root["button5"].nom.text = "instancie";
_root["button5"].onPress = function() {
startDrag(this);
//ajouter le doubleclick au pion
//if this is the first click
if (!click) {
timer = getTimer()/1000;
_root.click = true;
}else {
timer2 = getTimer()/1000;
}
//if it is a double click
if ((timer2-timer)<.25) {
trace("dblclick");
} else {
timer = getTimer()/1000;
_root.click = true;
}
};
_root["button5"].onRelease = function() {
stopDrag();
};
_root["button5"].onReleaseOutside = function() {
stopDrag();
}; |
Partager