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

#1 2011-05-13 20:24:23

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

Lock/Unlock Sprite

Is there a way to lock and unlock a sprite ( like if it can be dragged)?

Last edited by Qaze (2011-05-13 20:24:44)


http://i.imgur.com/2i8VY.gif

Offline

 

#2 2011-05-13 20:27:22

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Lock/Unlock Sprite

Go to the sprite's script page.  There is a little lock button at the top next to the sprite's name; click it and it will unlock.  It can now be dragged.  Click it again to lock it.
---

If you want it to lock and unlock during the project (if you don't want this then you don't need to read this part), you will need to create a script for dragging, like this:
http://i54.tinypic.com/2sbpcgj.gif
Now just change the variable Draggable?  from 0 to 1.  1 makes it draggable, 0 makes it locked.

Last edited by Kileymeister (2011-05-13 20:31:50)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-05-13 21:07:16

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

Re: Lock/Unlock Sprite

Thanks! I needed the 2nd part.


http://i.imgur.com/2i8VY.gif

Offline

 

Board footer