This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-06-12 23:14:49

SunnyPeacepaw
Scratcher
Registered: 2010-05-22
Posts: 10

How To Make Drag and Drop Projects

I'm making a project where you drag things, but I can't get it to work. I've looked at others who make projects like the one I 'm making, but I don't see anything in the scripts that makes it so you can drag them. Please Help!!!!!


Peacepaw Pet Service! I'll make you any pet with stuff for you to interact with. See my project: http://scratch.mit.edu/projects/SunnyPeacepaw/1061886

Offline

 

#2 2010-06-12 23:23:47

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How To Make Drag and Drop Projects

SunnyPeacepaw wrote:

I'm making a project where you drag things, but I can't get it to work. I've looked at others who make projects like the one I 'm making, but I don't see anything in the scripts that makes it so you can drag them. Please Help!!!!!

Go into the sprite you want to drag. At the top of the scripts pane, there's a little pane that tells you some general information about your sprite, and lets you rename it. Next to the field that lets you rename your sprite, there's a little padlack. Click on the padlock to unlock it, and your sprite is now draggable!

Offline

 

#3 2010-06-28 20:11:22

KewlBeanz
Scratcher
Registered: 2009-09-23
Posts: 100+

Re: How To Make Drag and Drop Projects

well theres what coolstuff said, or you could do this

<when green flag clicked>
<forever>
<if><touching[ mouse<<  <and>  >><mouse down?>
<go to[ mouse


i dont even know...

Offline

 

#4 2010-06-29 01:40:22

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: How To Make Drag and Drop Projects

Fixing KewlBeanz's script:

[blocks]
<when green flag clicked>
<forever>
<if> << <touching[ mouse-pointer <and> <mouse down?> >>
<go to[ mouse-pointer
<end>
<end>
[/blocks]

Offline

 

#5 2010-06-29 09:03:17

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How To Make Drag and Drop Projects

The above scripts will work fine, too - but if there's any lag the project won't work too well, especially if there's a small sprite or the mouse is moving quickly. I'd suggest using a script like this instead:

http://i46.tinypic.com/2n1b0xi.gif

Of course, it's still easier to do what I suggested above.

Offline

 

#6 2010-06-29 12:21:55

KewlBeanz
Scratcher
Registered: 2009-09-23
Posts: 100+

Re: How To Make Drag and Drop Projects

mathematics wrote:

Fixing KewlBeanz's script:

[blocks]
<when green flag clicked>
<forever>
<if> << <touching[ mouse-pointer <and> <mouse down?> >>
<go to[ mouse-pointer
<end>
<end>
[/blocks]

lol im not to good with the visual blocks on forums


i dont even know...

Offline

 

Board footer