| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
drag and drop using hitTest to snap to a MC - NEED HELP!
Hello!
I am writting to ask help.... I am trying to get one movieclip to be able to drag and then snap to another movieclip when it is close by. I am using this code...which sort of works...when I try it the meassage appears Correct! - if I get the one mc one the other but the movieclip does nto seem to snap and does disappears...can anyone help me with this? Lev1 is the name of the draggable movieclip. CODE: on(press) { x = this._x; y = this._y; startDrag(this); _root.answer1=""; } on(release) { stopDrag(); if (this.hitTest(_root.lev1._x, _root.lev1._y, true)) { this._x = _root.lev1._x; this._y = _root.lev1._y; _root.answer1="Correct"; _root.allCorrect +=1; } else { this._x = x; this._y = y; _root.answer1 = "Sorry, try again"; } } Thank you so much! |
![]() |
| Viewing: Tutorialized Forums > 2D Graphics > Flash > drag and drop using hitTest to snap to a MC - NEED HELP! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|