# Drag and drop help pls

**URL:** <https://forum.kirupa.com/t/drag-and-drop-help-pls/278685>\
**Category:** Uncategorized\
**Created:** [January 3, 2009, 8:39pm UTC](https://forum.kirupa.com/t/drag-and-drop-help-pls/278685 "2009-01-03T20:39:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gencoglu](https://forum.kirupa.com/u/gencoglu)\
**Post date:** [January 3, 2009, 8:39pm UTC](https://forum.kirupa.com/t/drag-and-drop-help-pls/278685/1 "2009-01-03T20:39:49Z")

</div>

hi,  
[FONT=Calibri][SIZE=3]I have five dynamic textboxes(box1…box2…box3…) which display ten digits randomly from 1 to 10…[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]And I have another five INPUTBOXES (inp1…inp2….) and finally five dynamic textboxes to show the results if what I droped is correct or wrong …[/SIZE][/FONT]  
[SIZE=3][FONT=Calibri]I converted “one” “two”… all the numbers to MC and gave them instance name “one…two…three… respectivly… but they dont work…[/FONT][/SIZE]  
[FONT=Calibri][SIZE=3]I am not sure if I should convert the inputboxes to a MC too ?[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]How do you code it ?[/SIZE][/FONT]

İf(box1.text.value==”5” )  
{  
İf(droptarget.value==”five”//which is a MC)  
{  
\_root.answer1.text=“correct”;

}  
}  
// here is all I have…

```php

on(press)
{
var mynums = new Array("1","2","3","4","5","6","7","8","9","10");
 
for(i=1;i<=5;i++)
{
var rn=Math.floor(Math.random()*9);
_root["box"+i].text = mynums[rn];
}
five.onPress=function() {
startDrag(this);
for(i=1;i<=5;i++){
_root["answer"+k].text="";
}
}
 
five.onRelease=function() {
stopDrag();
for(m=1;m<=5;m++){
if (this._droptarget == "/five")
{ 
 
_root["answer"+m].text="Correct";
}else{
_root["answer"+m].text="wrong";
} } 
} }
 

```

Thanks
