Hi,

I have created a simple drag and drop game with 4 signs to be dragged onto 4 targets. As two of the answers are the same I need to be able to have the possibility of both signs to be dragged onto either target.

Below is the code i am using - if anyone can help it would be much appreciated.

Thanks in advance,

m

stop();

// Second Level Quit button
// loads second.swf in again

quit_mc.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);

//go to next scene button

forwardTed.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextScene);


var dragArray:Array = [Sign30, Sign60, Sign70, Sign70_2 ];
var matchArray:Array = [Sign30Match, Sign60Match, SignMatch70 || SignMatch70_2 ];


var currentClip:MovieClip;
var startX:Number;
var startY:Number;

*

for(var i:int = 0; i < dragArray.length; i++) {

**dragArray[i].buttonMode = true;**
**dragArray[i].addEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
**matchArray[i].alpha = 0.0;

}

*

function item_onMouseDown(event:MouseEvent):void {
****currentClip = MovieClip(event.currentTarget);
****startX = currentClip.x;
****startY = currentClip.y;
****addChild(currentClip); //bring to the front
****currentClip.startDrag();
****stage.addEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);

}

function stage_onMouseUp(event:MouseEvent):void {
****stage.removeEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
****currentClip.stopDrag();
****var index:int = dragArray.indexOf(currentClip);
****var matchClip:MovieClip = MovieClip(matchArray[index]);
****if(currentClip.hitTestObject(matchClip)) {

********//a match was made! position the clip on the matching clip:
********currentClip.x = matchClip.x;
********currentClip.y = matchClip.y;
********//make it not draggable anymore:
********currentClip.removeEventListener(MouseEvent .MOUSE_DOWN, item_onMouseDown);
* currentClip.buttonMode = false;

****} else {

********//match was not made, so send the clip back where it started:
currentClip.x = startX;
currentClip.y = startY;

****}

}