# startDrag and stopDrag() problem

**URL:** https://forum.kirupa.com/t/startdrag-and-stopdrag-problem/296573
**Category:** Uncategorized
**Created:** [September 16, 2009, 8:40pm UTC](https://forum.kirupa.com/t/startdrag-and-stopdrag-problem/296573 "2009-09-16T20:40:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mihaispr](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@mihaispr](https://forum.kirupa.com/u/mihaispr)
#### Post date: [September 16, 2009, 8:40pm UTC](https://forum.kirupa.com/t/startdrag-and-stopdrag-problem/296573/1 "2009-09-16T20:40:02Z")

</div>

I have a .fla file that provides me to drag and drop the rectangle squished from my scene.

```auto

onClipEvent(enterFrame){
}
on(press)
  {
    startDrag(this);
  }
  
  on(release, releaseOutside)
  {stopDrag(this);
  }

```

And it’s working you can download the source here.

dreptunghi\_mc is the instance of my rectangle which is draw on scene.  
What I want to do is to replace this code using on handler event so that I obtain the same effect of drag& drop.

Here’s what I’ve tried:

```auto

onClipEvent(enterFrame)
{
on(press)
{_root.dreptunghi_mc.startDrag(this.dreptunghi_mc);
}

on(release, releaseOutside)
{_root.dreptunghi_mc.stopDrag(this.dreptunghi_mc);
}

}

```

dreptunghi\_mc is the instance\_name of my movieclip symbol.

Can you help me please?
