Dear.D
22.05.2008, 16:04
Значится так, есть некий мувик. При onPress он должен быть startDrag, при двойном клике он должен _xscale *= -1
mc.onPress = function() {
if (this.flag != true) {
this.startDrag();
this.time = getTimer();
this.flag = true;
} else {
if (getTimer()-this.time<300) {
//после одного нажатия эта фигня перестает работать, но только до следующего клика this._xscale *= -1;
this.flag = false;
} else {
this.startDrag();
this.flag = false;
}
}
};
mc.onRelease = mc.onReleaseOutside=function () {
stopDrag();
};
как поправить? :confused:
mc.onPress = function() {
if (this.flag != true) {
this.startDrag();
this.time = getTimer();
this.flag = true;
} else {
if (getTimer()-this.time<300) {
//после одного нажатия эта фигня перестает работать, но только до следующего клика this._xscale *= -1;
this.flag = false;
} else {
this.startDrag();
this.flag = false;
}
}
};
mc.onRelease = mc.onReleaseOutside=function () {
stopDrag();
};
как поправить? :confused: