PDA

View Full Version : dragging & targets question



kidpablo
September 18th, 2003, 09:52 AM
OK here's the question. Say I have 3 target MCs and 3 draggable buttons (all the same).

all 3 buttons needs to be dragged onto a seperate target mc (doesn't matter which). The thing is, how would I say/express - 'if 2 of the same buttons are placed on the smae target mc, do this action to tell the user its wrong!?'

thanks

eki
September 18th, 2003, 11:51 AM
Hi,

I guess that you know the mcTarget the button is been dropped onto. the only thing you need to do is add a property to thet mc.
I.e.: myTargetMc.isEngaged = true;
Then , when a button is dropped look if the targetMc has got the isEngaged property:
if (myTargetMc.isEngaged == false){
doNormalThings();
} else {
tellTheUserItsWrong();
}