# I need help with a drag n' drop chess game

**URL:** <https://forum.kirupa.com/t/i-need-help-with-a-drag-n-drop-chess-game/325105>\
**Category:** Uncategorized\
**Created:** [September 26, 2011, 9:27pm UTC](https://forum.kirupa.com/t/i-need-help-with-a-drag-n-drop-chess-game/325105 "2011-09-26T21:27:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bray1250](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bray1250](https://forum.kirupa.com/u/bray1250)\
**Post date:** [September 26, 2011, 9:27pm UTC](https://forum.kirupa.com/t/i-need-help-with-a-drag-n-drop-chess-game/325105/1 "2011-09-26T21:27:46Z")

</div>

Could anyone tell me why my code doesn’t work???

For some reason, my character only drops onto “/a1”

onClipEvent (load) {  
var coordY:Number = 0;  
var coordX:Number = 0;  
}

on (press) {  
startDrag(this, true);  
coordY == 0;  
coordX == 0;  
}

on (release) {  
[COLOR=#a9a9a9]//insert desired space as droptarget[/COLOR]  
if (this.\_droptarget == “/a1”) {  
stopDrag();  
coordY == 1;  
coordX == 1;  
}  
if (this.\_droptarget == “/a2”) {  
stopDrag();  
coordY == 1;  
coordX == 2;  
}  
if (this.\_droptarget == “/a3”) {  
stopDrag();  
coordY == 1;  
coordX == 3;  
}  
if (this.\_droptarget == “/a4”) {  
stopDrag();  
coordY == 1;  
coordX == 4;  
}  
if (this.\_droptarget == “/a5”) {  
stopDrag();  
coordY == 1;  
coordX == 5;  
}  
if (this.\_droptarget == “/a6”) {  
stopDrag();  
coordY == 1;  
coordX == 6;  
}  
if (this.\_droptarget == “/a7”) {  
stopDrag();  
coordY == 1;  
coordX == 7;  
}  
if (this.\_droptarget == “/a8”) {  
stopDrag();  
coordY == 1;  
coordX == 8;  
}  
if (this.\_droptarget == “/b1”) {  
stopDrag();  
coordY == 2;  
coordX == 1;  
}  
}

If you its difficult to understand, I can e-mail my .fla file to whoever will help me

thanks in advance,

HawK.

P.S. I have made an MC for each space on the board. They are the “droptargets”
