View Full Version : Drag and drop code (for a puzzle).
Plague
05-13-2007, 10:34 PM
Well, here is an ActionScript snippet for dragging and droping thing's,
onClipEvent (mouseDown) {
//hittest for collision with mousedown
//_xmouse and _ymouse to follow your cursor
//true for determining whether to do it or not
if (this.hitTest(_root._xmouse,_root._ymouse,
true)) {
startDrag(this);
}
}
onClipEvent (mouseUp) {
//for when you release it saying to not follow the cursor
stopDrag();
}
//also works in earlier version's of flash.
ninjapanda
05-20-2007, 06:36 PM
cool. Thx for the tut man! I've been wondering how to do that for a while! :)
Saline
05-20-2007, 07:06 PM
Give a man a fish, he eats for a day. Teach a man a fish, he eats for a week. It's obvious you copied and pasted this code here.
Plague
05-20-2007, 07:27 PM
:.;840304']Give a man a fish, he eats for a day. Teach a man a fish, he eats for a week. It's obvious you copied and pasted this code here.
What the hell is wrong with you! Just because it works and looks like other codes doesn't mean it's C&P, it's just the right way to do it!
koose14
05-20-2007, 07:37 PM
Hey, .:[DA]:., isnt it give a man a fish he eats for a day, teach a man to fish he eats for his life?
Apples
05-20-2007, 07:58 PM
Its simple actionscript.
And this type of "tutorial" has been made thousands of times.
Seriously, explain about the code instead of just pasting it.
Plague
05-20-2007, 08:36 PM
Its simple actionscript.
And this type of "tutorial" has been made thousands of times.
Seriously, explain about the code instead of just pasting it.
Kk, I will explain more.
Plague
05-20-2007, 08:41 PM
cool. Thx for the tut man! I've been wondering how to do that for a while! :)
Sorry for the double post, btw, your welcome.
Freddeh
05-23-2007, 12:09 PM
Copy & Pasted.
vBulletin® v3.6.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.