Flash Tutorial: How To Make A Dragable Object
Top Comments
All Comments (15)
-
Well, you could try and make a new layer and then apply the same code.
-
you left out a very important fact. it wont work unless you click the button and look in the properties panel where it says instance name type Drag with a capital D. then if you want more 2 work on your second button name it Drag2 and change the code in that one from:
on(press){ startDrag(Drag);
}
on(release){ stopDrag();
} To:
on(press){ startDrag(Drag2);
}
on(release){ stopDrag();
}
if it does not work after that check you spelling and proper capitalizations on the D's
-
lol just make them two different symbols
-
It's SO MUCH EASIER to make them on different layers!
-
it dont moves one at time like you said
-
DOEsnt Work AgAin! PLEASE HELP ME IM stuck
-
To make 2 objects drag seperate give them 2 different instance names and change the (Drag) in the code to whateva you called the instance name on the second object...
i know how to drag one at time!
just make an objekt and make it as "MOVIE CLIP"....... NOT button!!!
then put this in the actions :
on(press){ this.startDrag();
}
on(release, releaseOutside){ this.stopDrag();
}
FlashUser95 3 years ago 3
This code is working:
on(press){
this.startDrag();
}
on(release){ this.stopDrag();
}
D3VOLV3 3 years ago 2