суббота, 23 января 2010 г.

Танграм

stop ();
tr1.onPress = function () {
this.startDrag();
tr1._rotation +=90;
_root.checkHit_int = setInterval(_root.checkHit_func, 100);
}
tr1.onRelease = tr1.onReleaseOutside=function () {
this.stopDrag();
clearInterval(_root.checkHit_int);
};

tr2.onPress = function () {
this.startDrag();
tr2._rotation +=90;
_root.checkHit_int = setInterval(_root.checkHit_func, 100);
}
tr2.onRelease = tr2.onReleaseOutside=function () {
this.stopDrag();
clearInterval(_root.checkHit_int);
};

romb.onPress = function () {
this.startDrag();
romb._rotation +=90;
_root.checkHit_int = setInterval(_root.checkHit_func, 100);
}
romb.onRelease = romb.onReleaseOutside=function () {
this.stopDrag();
clearInterval(_root.checkHit_int);
};

pr.onPress = function () {
this.startDrag();
pr._rotation +=90;
_root.checkHit_int = setInterval(_root.checkHit_func, 100);
}
pr.onRelease =pr.onReleaseOutside=function () {
this.stopDrag();
clearInterval(_root.checkHit_int);
};


function checkHit_func() {
if (_root.romb.hitTest(_root.romb1) and _root.pr.hitTest(_root.pr1) and _root.tr1.hitTest(_root.tr11) and _root.tr2.hitTest(_root.tr22)) {

_root.gotoAndStop(2);
}
}

0 коммент.:

Отправить комментарий