View Full Version : stop doing that!!!
lumpie_wan
07-09-2008, 09:17 PM
I have a simple drag and drop quiz type thing. It is keeping score correctly and it is locking the draggable mc so that it can not be moved once it is on the correct droptarget, however... I can still drop other draggable mc's onto the droptarget that is already occupied by the correct draggable mc.
I havent been able to find a way to "lock" or "disable" the droptarget mc.
any suggestions?!?!?!?
Well, we would have to see the code/file to tell you how to disable it, but essentially you would just stop checking for hits on the drop target once it has a clip in place on it.
Perhaps you create a boolean variable for each drop target that gets set to true when the clip is in place. Then evaluate that variable when the clips are being dragged.
You must have some sort of hitTest or coordinate evaluation going on to determine if a clip is over a target, you could just evaluate the boolean variable in that and not allow a positive hit if the var is already true.
lumpie_wan
07-31-2008, 02:21 PM
thank you.
It took three days to fix but I finally got it. I had the hit test moving the target to another frame in the droptarget itself to show a check mark or X for correct or wrong then resetting the draggable if it was wrong.
The problem was that my X and checkmarks were outside the droptarget "space" and that was causing the draggable to be able to be placed on the droptarget even though it was already occupied. Beacuse once the droptarget moved to that new frame to play the var was set to lock if correct or start over as unoccupied if wrong.
I moved the X and checkmarks to within the droptarget space and everything worked!
The biggest problems are ALWAYS caused by the simplest things.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.