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

#1 2008-04-15 01:44:25

Oliviamonika
Scratcher
Registered: 2008-04-08
Posts: 2

Moving sprites on screen

I am new to Scratch and have some questions. I made a project on my computer where you could click on an object using the mouse and drag it to another spot. But when I uploaded it to the website, I was no longer able to click and drag objects.

How can I write a script to drag an object?

Offline

 

#2 2008-04-15 02:24:33

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Moving sprites on screen

Try This:

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


~ihaveamac - visit ihaveamac.net

Offline

 

#3 2008-04-15 03:28:09

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Moving sprites on screen

Hi Oliviamonika, you can also click on the little padlock symbol on top of the scripting pane to make the sprite "draggable online".


Jens Mönig

Offline

 

#4 2008-04-15 14:10:27

Oliviamonika
Scratcher
Registered: 2008-04-08
Posts: 2

Re: Moving sprites on screen

Hi thanks for the help its really helpfull! What could i have done without you two?!
Thanks ALOT!
      Oliviamonika

Offline

 

Board footer