Draggable form question

I have a “recommend this site” form as a MC on my main stage. I want to make it draggable so I have used this code in the instance of the form MC:

onClipEvent (mouseDown) {
onClipEvent (mouseUp) {

this allows the clip to drag, but you can click anywhere on the stage and drag it. How do I make it so it will drag when you hold down the mouse OVER the MC only and not everywhere else.

make the a spot on the form where the user can drag it (usually labled drag)

add these actions…

on (press) {
on (release) {

After the actions are added to the button add it to the form where you want. Then select all the items and make them one big movie clip (call it dragForm, or whatever you want). The button should drag everything that is included in the dragForm movie clip.

yes I have done that before… but I would like to accomplish this without using a button. That way I can avoid the change in cursor associated with passing over a button. And also I want ANY part of the movie clip to be able to be used as a drag area without interfering with the buttons in the form. With the code I put up there in my post all of this is accomplished, but as I said the area to click on in order to drag is the entire stage. Is there another way???
Thanks again

Ok, I am not an expert so I am not positive on how to do it the way you want. I do however know how to get rid of the annoying mouse cursor in Flash MX.

on (rollOver) {
    _root.myButton.useHandCursor = false;

Just add that to your button. (myButton = the instance name of your button).

Good luck in your mission! Sorry I couldn’t help more.

Thanks for your help…
Can anyone else offer me some more info on how to get closer to my goal? I am thinking that I need to use an if statement saying:

if (mouse position = over MC ) {

onClipEvent (mouseDown) {
onClipEvent (mouseUp) {

I just cannot figure out how to do the first line - PLEASE HELP!

upload a small example fla of what u want to achieve please
That would help more people to experiment with the example
and so the solution would maybe be found faster

Here is a sample .fla so you can see what I am talking about. I believe I need some sort of if() condition before the startDrag condition - something that only allows the drag condition to run if the mouse is OVER the MC. Thanks for all your help!!!

Help anyone?

Sorry for not answering for so long
My internet was breaking up…

(I’ve put a new layer with the script inside the form movieclip)

Good luck

With mx, you can give button handlers to clip, so what Lostinbeta said first is totally correct, you don’t have to use a button.

And the thing about the hand not showing, no need to do it on rollover, just put it in the first frame.

Sorry ma’deel if this is redundant with your file.

pom :asian:

not at all, ilyaslamasse

I’m a pure beginer in actionscripting
the kinda selflearner, who didn’t bother to buy a book :slight_smile:

But i’m thinking of getting a couple

MX actionscript is ql!

…btw, kirupaforum is really good
u learn something new every day!

Thank you so much! I really appreciate all your help.

P.S. Doesn’t Kirupa rock?! : )