# attachMovie then drag it!

**URL:** <https://forum.kirupa.com/t/attachmovie-then-drag-it/224392>\
**Category:** flash\
**Created:** [May 2, 2007, 1:48am UTC](https://forum.kirupa.com/t/attachmovie-then-drag-it/224392 "2007-05-02T01:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hondo311](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@hondo311](https://forum.kirupa.com/u/hondo311)\
**Post date:** [May 2, 2007, 1:48am UTC](https://forum.kirupa.com/t/attachmovie-then-drag-it/224392/1 "2007-05-02T01:48:21Z")

</div>

Hi,  
I’m new to attachMovie and have a question (or 2).

I have a button that when pressed, will load a movie that I can then drag around.

here’s the actionscript on my button (“FFC\_frame” is the name and Identifier name of the movie clip I’m loading, FFC\_frame2 I think is the new movie it actually loads, then i have a startDrag that works fine, and a stopDrag that doesn’t work at all):

* * *

## on (release) { attachMovie(“FFC\_frame”, “FFC\_frame2”, 1); FFC\_frame2.\_x = 100; FFC\_frame2.\_y = 100; FFC\_frame2.startDrag(); FFC\_frame2.onPress.stopDrag(); }

Here’s what I’d like to do (and I don’t think I’m going about it the right way):

1. I want to load the movie when the button is clicked.

2. I want to drag the movie clip only when it is clicked and moved (mouse down on the clip) and I want the movie clip to stop dragging when the mouse button is released (so it can be places anywhere within the flash movie).

3. Finally, I’d like a way to unload or “close” the movie clip when a certain part of it is pressed (like a “close” button)

Any help would be greatly appreciated! Attached is a Flash 8 file (that’s why I included the AS code above in this message).

Thanks!

Hondo311
