# Drag loaded images

**URL:** <https://forum.kirupa.com/t/drag-loaded-images/100142>\
**Category:** Uncategorized\
**Created:** [January 26, 2004, 10:52am UTC](https://forum.kirupa.com/t/drag-loaded-images/100142 "2004-01-26T10:52:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Presik](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@Presik](https://forum.kirupa.com/u/Presik)\
**Post date:** [January 26, 2004, 10:52am UTC](https://forum.kirupa.com/t/drag-loaded-images/100142/1 "2004-01-26T10:52:55Z")

</div>

Hi there,

I’m trying for days but i can’t get it to work:

With the code below i load two images in separate MC’s

- 

var h = “image” + “1”  
var h2 = “image” + “2”  
\_root.createEmptyMovieClip(h,1);  
loadMovie(h + “.jpg”, h);  
\_root.createEmptyMovieClip(h2,2);  
loadMovie(h2 + “.jpg”, h2);\*

And with  
\*  
\_root.onMouseDown = function () {  
startDrag (h,false) ;  
}  
\_root.onMouseUp = function () {  
stopDrag () ;  
}\*

I want to drag the image where the pointer is on.

But now i can only drag 1 image (in this case MC with image1)  
How can i select the MC that i want to drag?

There has to be a way to detect which MC i want to grad.  
Include a button in the MC? How in actionscript???

Thanks
