# Incorrect reference type

**URL:** https://forum.kirupa.com/t/incorrect-reference-type/243594
**Category:** flash
**Created:** [November 8, 2007, 5:40pm UTC](https://forum.kirupa.com/t/incorrect-reference-type/243594 "2007-11-08T17:40:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)
#### Post date: [November 8, 2007, 5:40pm UTC](https://forum.kirupa.com/t/incorrect-reference-type/243594/1 "2007-11-08T17:40:21Z")

</div>

For the following class snippet:

```auto

private var ali:Loader;
 
public function MyClass():void {
   ali = new Loader();
   addChild(ali);
   ali.load(new URLRequest("images/ali.swf"));
 
...
   ali.addEventListener(MouseEvent.MOUSE_DOWN, moveAli);
}
 
private function moveAli() {
   ali.startDrag();
}

```

I get the error “1061: Call to a possibly undefined method startDrag through a reference with static type flash.display:Loader.”

I get that I can’t drag a Loader object. But I need to be able to. What’s the solution here?

Thanks!
