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

#1 2009-08-09 13:49:03

bendad
Scratcher
Registered: 2008-06-14
Posts: 100+

How do I change the start-up sprite in the source code?

I have been wondering this for ages. Does anybody know? Jens? Paddle2See? Scratch Team?


Hi!  big_smile
Good to see you. (Even if I don't know you  wink  )

Offline

 

#2 2009-08-09 18:57:01

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

Re: How do I change the start-up sprite in the source code?

Yup! It's in the reference guide:

Export your sprite as default.sprite and place it into the costumes folder. If you just want to change the default costume, place the picture file named default.jpg or BMP / GIF / PNG into the costumes folder.

No need to edit the source code...


Jens Mönig

Offline

 

#3 2009-08-09 19:00:51

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: How do I change the start-up sprite in the source code?

Can we change the default sprite back by removing our sprite from the folder?

Offline

 

#4 2009-08-09 20:13:56

songhead95
Scratcher
Registered: 2008-03-19
Posts: 100+

Re: How do I change the start-up sprite in the source code?

Can you do anything to change the background?

Offline

 

#5 2009-08-10 23:06:02

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: How do I change the start-up sprite in the source code?

i am using ScratchSourceCode1.3.1 version. your method is not work for it because no costumes folder inside.
do you have any method to change the default image?

thank you!

Offline

 

#6 2009-08-11 01:39:04

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

Re: How do I change the start-up sprite in the source code?

Hong1818 wrote:

i am using ScratchSourceCode1.3.1 version. your method is not work for it because no costumes folder inside.
do you have any method to change the default image?

thank you!

Hi, Hong1818.

If you want to change the appearance of Scratch using the Source Code (1.3) you will need to become aquainted with Squeak Smalltalk.

Scratch's graphics are stored in a class variable of ScratchFrameMorph named ScratchSkin, which is a Dictionary. There are methods on the class side of ScratchFrameMorph wich let you alter the default skin and build it from a dictionary of picture files. This way you can exchange the Scratch logo and the Scratch cat costume, which you are required to do if you want to create your own software based on Scratch.

Does this help you along?


Jens Mönig

Offline

 

#7 2009-08-11 03:23:46

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: How do I change the start-up sprite in the source code?

Jens wrote:

Hong1818 wrote:

i am using ScratchSourceCode1.3.1 version. your method is not work for it because no costumes folder inside.
do you have any method to change the default image?

thank you!

Hi, Hong1818.

If you want to change the appearance of Scratch using the Source Code (1.3) you will need to become aquainted with Squeak Smalltalk.

Scratch's graphics are stored in a class variable of ScratchFrameMorph named ScratchSkin, which is a Dictionary. There are methods on the class side of ScratchFrameMorph wich let you alter the default skin and build it from a dictionary of picture files. This way you can exchange the Scratch logo and the Scratch cat costume, which you are required to do if you want to create your own software based on Scratch.

Does this help you along?

Dear Jens ,

Thank you for your prompt reply.

I am still new in Squek Smalltalk and still learning to use it now.
I have few questions to ask you and thank you in advance for your replies.

1. The latest  source code that I downloaded from Scratch site is version 1.3.1 which do not have the costumes folder that you mentioned in previous reply. I would like to know which version of source code you are using and that contains the costumes folder?

2. I had tried to follow your steps which are check on the ScratchFrameMorph and click on to the ScractchSkin class -> readSkinFrom and initFont fuctions but still not really understand on the codes. Or do I need to go to the instance -> other functions in the instance to change some codes so that I can exchange the Scratch logo and Scratch cat costume? Could you please kindly explain in more details and let me know where is the skin dictionary that I can change the logo and cat costume?

Thank you very much in advance for your reply.

Offline

 

#8 2009-08-15 19:59:43

ealbers
Scratcher
Registered: 2009-02-16
Posts: 10

Re: How do I change the start-up sprite in the source code?

Hi Hong, I'm also learning the squeak system, looking at the class system, try:

Click on Scratch-UI-Panes, then next window to the right, click on ScratchFrameMorph
Then click on initialization and then in the rightmost frame click on 'SetDefaultSprite'

Here you will see where tests if the default sprite exists, and if so, uses it, I'm still playing with this, I'm a c++ and Java/assembly person, but used smalltalk way back in 80 :-)

Eric

Offline

 

#9 2009-08-16 03:00:58

Hong1818
Scratcher
Registered: 2009-06-30
Posts: 33

Re: How do I change the start-up sprite in the source code?

thank you eric,
i have successfully change the default sprite,
just put a file called "default.sprite" in the same folder with .exe.

you help me a lot....
hong.

Offline

 

#10 2009-08-21 10:17:45

bendad
Scratcher
Registered: 2008-06-14
Posts: 100+

Re: How do I change the start-up sprite in the source code?

Jens wrote:

Yup! It's in the reference guide:

Export your sprite as default.sprite and place it into the costumes folder. If you just want to change the default costume, place the picture file named default.jpg or BMP / GIF / PNG into the costumes folder.

No need to edit the source code...

Thanks Jens! I have another question. After I change the "Based on Scratch by MIT" logo, how do I save the new logo? I have been wondering this for a while. I am trying to move around the functions and buttons and I am not sure how to save those positions. Is it the same as the logo? I have tryed all the things I can think of and they are not working so well.

Thanks!

-Bendad


Hi!  big_smile
Good to see you. (Even if I don't know you  wink  )

Offline

 

Board footer