# AS2 - Drag and Drop from scrollPane - Possible?

**URL:** <https://forum.kirupa.com/t/as2-drag-and-drop-from-scrollpane-possible/257439>\
**Category:** Uncategorized\
**Created:** [April 14, 2008, 11:55am UTC](https://forum.kirupa.com/t/as2-drag-and-drop-from-scrollpane-possible/257439 "2008-04-14T11:55:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hairytea](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@hairytea](https://forum.kirupa.com/u/hairytea)\
**Post date:** [April 14, 2008, 11:55am UTC](https://forum.kirupa.com/t/as2-drag-and-drop-from-scrollpane-possible/257439/1 "2008-04-14T11:55:46Z")

</div>

Hi,

Sorry, newbie question.

I have been developing a T-Shirt Designer ([http://www.thanweb.co.uk/terry/flash/t\_shirt.html](http://www.thanweb.co.uk/terry/flash/t_shirt.html)) and found some AS to enable a file upload.

The following code is a small section of my code that uploads a users image to a folder and then downloads the image for preview in a scrollPane.

I want to be able to Drag and Drop the image that is inside the scrollPane, but the script (below) does not work??

```auto

function downloadImage(file:Object):Void {
  var Pic = "./files/" + file;
  imagePane.contentPath = Pic;
  this.imagePane.Pic.onPress = function(){
  imagePane.Pic.startDrag("");
  this.swapDepths(this.getNextHighestDepth());
  }
  this.imagePane.Pic.onRelease = function(){
  imagePane.Pic.stopDrag();
  }
}

```

Thank you for looking 🙂
