title: I have a AS3 class which extends movieClip with a dynamic image, how to make this image draggable?
body: <p>I need to make an item draggable (dragable?) Sorry if my terminology is not right!</p>
  
  <p>I have a class where I will store variable and do calculations:</p>
  
  <pre><code>package Classes
  {
      import flash.display.*;
      import flash.events.*;
      import flash.net.*;
  
      public class PrintItem extends MovieClip
      {     
          public var imageLoader:Loader;
  
          public function PrintItem()
          {
  
          }
  
          public function loadImage(url:String):void
          {
              imageLoader = new Loader();
              imageLoader.load(new URLRequest(url));
          }
      }
  } 
  </code></pre>
  
  <p>I create a new instance of the class, I pass it an URL in loadImage and I add it to the canvas like this:</p>
  
  <pre><code>var myItem:PrintItem = new PrintItem();
  myItem.loadImage("pic.jpg");
  this.addChild(myItem.imageLoader);
  myItem.imageLoader.x = 50;
  myItem.imageLoader.y = 50;
  myItem.imageLoader.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
  myItem.imageLoader.addEventListener(MouseEvent.MOUSE_UP, dropIt);
  </code></pre>
  
  <p>But there I am stuck. I need to make this item draggable and write the pickUp and dropIt functions. event.target.startDrag(false); doesn't work (Loader isn't draggable) and event.target.parent.startDrag(false); doesn't work as the whole stage becomes draggable! HELP! Is it because only the Loader is added to the stage?</p>