# Not that ActionScript:)!

**URL:** <https://forum.kirupa.com/t/not-that-actionscript/6527>\
**Category:** flash\
**Created:** [October 9, 2002, 6:10pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527 "2002-10-09T18:10:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![inti](https://avatars.discourse-cdn.com/v4/letter/i/7ea924/32.png) [@inti](https://forum.kirupa.com/u/inti)\
**Post date:** [October 9, 2002, 6:10pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/1 "2002-10-09T18:10:10Z")

</div>

So hi. I’m new to this forum. I have a question. I’m a full idiot when it comes to ActionScript (not only but that’s none of ur business :)). I want to make a moving pop-up window. I’ve done part of the job - i made it to appera. But what acctions do i need to asign to it that when it get pressed it’ll will move with the mouse and when u take the mouse off it’ll will stop on it’s place?:asian: Hayyah:). Thank u u wonderful ppl for the answer if there is one.  
Byez:smirk:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 9, 2002, 6:15pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/2 "2002-10-09T18:15:42Z")

</div>

Don’t look at my typos…my spelling is horrible!🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 9, 2002, 6:18pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/3 "2002-10-09T18:18:41Z")

</div>

As a little experiment…

Create a button. Put your button inside a movie clip. Apply these actions to your button…

```auto
on (press) {
	startDrag(this);
}
on (release) {
	stopDrag();
}

```

Note that it is important to put the button inside a movie clip, otherwise your start drag will drag the \_root of your movie (dragging EVERYTHING on the main timeline)

If you don’t want it in a movie clip, you can give your clip an instance name (in my example I gave it the instance name “dragger”) and add these actions…

```auto
on (press) {
	startDrag(_root.dragger);
}
on (release) {
	stopDrag();
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 9, 2002, 6:34pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/4 "2002-10-09T18:34:05Z")

</div>

you can apply the same code to a movie clip in MX, no need for the embedded button anymore.

Just fyi.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 9, 2002, 8:36pm UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/5 "2002-10-09T20:36:21Z")

</div>

'DOH that is too true :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 10, 2002, 7:49am UTC](https://forum.kirupa.com/t/not-that-actionscript/6527/6 "2002-10-10T07:49:48Z")

</div>

I’ll try that out. Hope it’ll work. Thanxies.
