# Help with drag and drop

**URL:** <https://forum.kirupa.com/t/help-with-drag-and-drop/252805>\
**Category:** Uncategorized\
**Created:** [February 23, 2008, 8:51pm UTC](https://forum.kirupa.com/t/help-with-drag-and-drop/252805 "2008-02-23T20:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![poet99](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@poet99](https://forum.kirupa.com/u/poet99)\
**Post date:** [February 23, 2008, 8:51pm UTC](https://forum.kirupa.com/t/help-with-drag-and-drop/252805/1 "2008-02-23T20:51:09Z")

</div>

hello, i have managed to get pictures to load via a mysql database.  
The trouble is that the drag and drop function will not work on these images.

-------------Code Start------------------------------------------------------

myLoadVars=new LoadVars(); myLoadVars.onLoad=function(ok){  
if(ok){ data\_txt.text=this.theText;

//loading in the image imageHolder\_mc.loadMovie(this.theImage);

//the drag and drop function  
imageHolder\_mc.onPress=function(){  
startDrag(this);  
}

imageHolder\_mc.onRelease=imageHolder\_mc.onReleaseOutside=function(){  
stopDrag(); }

}

}else{  
data\_txt.text=‘Error’;  
}

function loadData(sectionID){ myLoadVars.row=sectionID;  
myLoadVars.sendAndLoad(‘returndata.php’,myLoadVars,’POST’ ![](http://forum.kirupa.com/uploads/kirupa/4335/c50ae8258c947058.gif);

}

home\_btn.onRelease=function(){  
loadData(1);

}

about\_btn.onRelease=function(){  
loadData(2);

} news\_btn.onRelease=function(){  
loadData(3);

}  
-------------Code End------------------------------------------------------

Many Thanks
