Ok, lets put our heads together and make the
___/¯¯¯¯\________________________
| Download costume from |URL| |
¯¯¯\____/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
It is much needed, it would work but you imputing a URL of a image, which it downloads and makes into a costume!
So can you help make it!
EDIT:
Code found!
NXIII wrote:
(for personal use only, not in mods please!)
loadCostumeFrom: url
| img newC |
(url asLowercase endsWith: '.gif') ifTrue: [
img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: url)) nextImage.]
ifFalse: [
(url asLowercase endsWith: '.png') ifTrue: [
img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: url) contents) first]
ifFalse: [
img _ HTTPSocket httpJpeg: url]].
newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)).
self addMediaItem: newC.
Supports PNGs, GIFs, and JPEGs.
Last edited by johnnydean1 (2010-07-10 13:56:06)
Offline
i could try to make that, but it would probably through in an error if it wasn't an image file. but i can try.
Offline
(for personal use only, not in mods please!)
loadCostumeFrom: url
| img newC |
(url asLowercase endsWith: '.gif') ifTrue: [
img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: url)) nextImage.]
ifFalse: [
(url asLowercase endsWith: '.png') ifTrue: [
img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: url) contents) first]
ifFalse: [
img _ HTTPSocket httpJpeg: url]].
newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)).
self addMediaItem: newC.
Supports PNGs, GIFs, and JPEGs.
Last edited by nXIII (2010-06-17 20:37:52)
Offline
Thank you im making DLC in Panther and need the block!
Offline
Jens wrote:
sparks' sig wrote:
seg amol, hesch ksee wie vili farbe das er git? Wer seits gad numme wies und schwarz?
[off topic] you're Swiss?!
That I am
I was born there but I live in England now
I'm impressed that you got that
I assume you are at least part German from your name and the fact your comments are all over the de.po file
Offline
I understand a bit of german e.g schwarz is black
Offline
nXIII wrote:
(for personal use only, not in mods please!)
loadCostumeFrom: url
| img newC |
(url asLowercase endsWith: '.gif') ifTrue: [
img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: url)) nextImage.]
ifFalse: [
(url asLowercase endsWith: '.png') ifTrue: [
img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: url) contents) first]
ifFalse: [
img _ HTTPSocket httpJpeg: url]].
newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)).
self addMediaItem: newC.Supports PNGs, GIFs, and JPEGs.
Do you mind if I copy it into my own version of Scratch? It's called Scribe, but I'm not going to publish it. Too many other identical ones. So it would be for personal use.

Offline
AmoebaMan wrote:
nXIII wrote:
(for personal use only, not in mods please!)
loadCostumeFrom: url
| img newC |
(url asLowercase endsWith: '.gif') ifTrue: [
img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: url)) nextImage.]
ifFalse: [
(url asLowercase endsWith: '.png') ifTrue: [
img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: url) contents) first]
ifFalse: [
img _ HTTPSocket httpJpeg: url]].
newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)).
self addMediaItem: newC.Supports PNGs, GIFs, and JPEGs.
Do you mind if I copy it into my own version of Scratch? It's called Scribe, but I'm not going to publish it. Too many other identical ones. So it would be for personal use.
Oh, yea, that's fine!
Last edited by nXIII (2010-06-18 12:03:05)
Offline
AmoebaMan wrote:
johnnydean1 wrote:
I understand a bit of german e.g schwarz is black
so then what is Schwarzennegar? (probably misspelled
)
he's right, it's a name, but literally translated into english is means a black black person.
Offline
Ok then as this one was done quickly how about a:
Get Sound From |URL|
Same as costume but sound!
Offline
sparks wrote:
johnnydean1 wrote:
I understand a bit of german e.g schwarz is black
good luck understanding Swiss...
![]()
Google Translate says: "seg amol, Hesch ksee vili color as it git? Who gad hand numbered and pointed black?"
Offline
sparks wrote:
Jens wrote:
sparks' sig wrote:
seg amol, hesch ksee wie vili farbe das er git? Wer seits gad numme wies und schwarz?
[off topic] you're Swiss?!
That I am
I was born there but I live in England now
I'm impressed that you got that
I assume you are at least part German from your name and the fact your comments are all over the de.po file
![]()
Hehe, I am fully German living in Germany
Isn't it cool how Scratch and programming gets people of all ages and countries together?
Offline
Jens wrote:
sparks wrote:
Jens wrote:
[off topic] you're Swiss?!That I am
I was born there but I live in England now
I'm impressed that you got that
I assume you are at least part German from your name and the fact your comments are all over the de.po file
![]()
Hehe, I am fully German living in Germany
![]()
Isn't it cool how Scratch and programming gets people of all ages and countries together?
You're German but you know English.....I wish I knew another language.....
Offline
bigreader wrote:
sparks wrote:
johnnydean1 wrote:
I understand a bit of german e.g schwarz is black
good luck understanding Swiss...
![]()
Google Translate says: "seg amol, Hesch ksee vili color as it git? Who gad hand numbered and pointed black?"
... It got ONE word right. The first person (not jens) who can tell me what is says gets a luv and a fave from me
Jens, that's pretty cool, and you speak great English
It is nice that people all over the world can use it, in fact, funny story for you, I was on an exchange a few weeks ago in Berlin, and the family there had three boys of varying ages from 13-16 and a computer. Naturally I introduced them to Scratch, and they were clicking away and fighting for control of the mouse in moments
It was certainly a novel experience teaching the basics of scratch in German as I suddenly had to call the stage "Die Buhne" and sprites became "Das Obiect" But it was worth it, and they had a simple arrow key one-player game going in a couple of hours. The best part for me was watching them suddely discover a new block and how to use it and realise what they could do with it, or suddenly cut down on the number of blocks they were using
It was great and I thought you'd like to hear about it
Offline
celloguy123 wrote:
Why are we talking about where jens lives?
Scroll up...
Anyway, I think the code should be moved to the top of the page aswell as the restrictions given by nXIII so that people don't snap it up.
Offline