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

#1 2011-01-06 11:47:25

nmuta
New Scratcher
Registered: 2010-09-22
Posts: 2

Can I Reference Or Create Instances Of Sprites With Code?

Is there a way to dynamically delete sprintes on the stage with code? In other words make a list that contains references to sprites on the stage, and when you delete the list item, the graphic disappears as well?

Please advise !

The "stamp" doesn't seem to be a good solution because once you stamp something, you can't gid rid of it or reference it.

Offline

 

#2 2011-01-06 12:11:35

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can I Reference Or Create Instances Of Sprites With Code?

You can't delete sprites...but you can hide them, using the Hide block.  Or, if you are using stamps, you can use the Clear block...but it will clear ALL stamps and pen marks so that might not work for you.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2011-01-06 12:49:43

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Can I Reference Or Create Instances Of Sprites With Code?

for stamps, have a white costume and stamp over the other one.
but if you are using a multicolor background that wouldn't work.

the eraser blocks for a future scratch!

Offline

 

#4 2011-01-08 05:03:11

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Can I Reference Or Create Instances Of Sprites With Code?

self coerceSpriteArg: 'name of sprite'


/* No comment */

Offline

 

Board footer