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

#1 2010-06-17 13:19:16

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Lets make a block!

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)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-06-17 15:34:29

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Lets make a block!

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

 

#3 2010-06-17 16:01:45

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Lets make a block!

It is something we would like to be possible in Panther 1.1 as part of our move to first-classness  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#4 2010-06-17 18:58:59

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

Re: Lets make a block!

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?!


Jens Mönig

Offline

 

#5 2010-06-17 20:36:44

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Lets make a block!

(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)


nXIII

Offline

 

#6 2010-06-17 22:09:14

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Lets make a block!

Well, there you go. The Squeak master strikes again.  smile


Hai.

Offline

 

#7 2010-06-18 03:36:49

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

Thank you im making  DLC in Panther and need the block!


You can now reach me on Twitter @johnnydean1_

Offline

 

#8 2010-06-18 11:37:30

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Lets make a block!

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  smile  I was born there but I live in England now  smile  I'm impressed that you got that  big_smile  I assume you are at least part German from your name and the fact your comments are all over the de.po file  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#9 2010-06-18 11:38:30

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

I understand a bit of german e.g schwarz is black


You can now reach me on Twitter @johnnydean1_

Offline

 

#10 2010-06-18 11:47:58

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Lets make a block!

johnnydean1 wrote:

I understand a bit of german e.g schwarz is black

good luck understanding Swiss...  tongue


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#11 2010-06-18 11:56:14

AmoebaMan
Scratcher
Registered: 2009-01-26
Posts: 500+

Re: Lets make a block!

johnnydean1 wrote:

I understand a bit of german e.g schwarz is black

so then what is Schwarzennegar? (probably misspelled  tongue )


http://i942.photobucket.com/albums/ad269/RyanScathe/AmoebaMan.png

Offline

 

#12 2010-06-18 11:57:02

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

a name lol


You can now reach me on Twitter @johnnydean1_

Offline

 

#13 2010-06-18 11:57:33

AmoebaMan
Scratcher
Registered: 2009-01-26
Posts: 500+

Re: Lets make a block!

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.


http://i942.photobucket.com/albums/ad269/RyanScathe/AmoebaMan.png

Offline

 

#14 2010-06-18 12:02:58

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Lets make a block!

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)


nXIII

Offline

 

#15 2010-06-18 12:03:39

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

Can I use it in CYOB?


You can now reach me on Twitter @johnnydean1_

Offline

 

#16 2010-06-18 12:06:27

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Lets make a block!

johnnydean1 wrote:

Can I use it in CYOB?

Yea, that's personal use.

I just meant, don't waste your time putting it in a new mod or something.


nXIII

Offline

 

#17 2010-06-18 12:07:33

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Lets make a block!

AmoebaMan wrote:

johnnydean1 wrote:

I understand a bit of german e.g schwarz is black

so then what is Schwarzennegar? (probably misspelled  tongue )

he's right, it's a name, but literally translated into english is means a black black person.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#18 2010-06-18 13:54:30

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

Ok then as this one was done quickly how about a:

Get Sound From |URL|


Same as costume but sound!


You can now reach me on Twitter @johnnydean1_

Offline

 

#19 2010-06-20 09:04:45

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Lets make a block!

bump


You can now reach me on Twitter @johnnydean1_

Offline

 

#20 2010-06-20 21:22:01

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: Lets make a block!

sparks wrote:

johnnydean1 wrote:

I understand a bit of german e.g schwarz is black

good luck understanding Swiss...  tongue

Google Translate says: "seg amol, Hesch ksee vili color as it git? Who gad hand numbered and pointed black?"


I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#21 2010-06-21 07:55:17

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

Re: Lets make a block!

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  smile  I was born there but I live in England now  smile  I'm impressed that you got that  big_smile  I assume you are at least part German from your name and the fact your comments are all over the de.po file  smile

Hehe, I am fully German living in Germany  big_smile
Isn't it cool how Scratch and programming gets people of all ages and countries together?


Jens Mönig

Offline

 

#22 2010-06-21 09:33:23

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Lets make a block!

Jens wrote:

sparks wrote:

Jens wrote:


[off topic] you're Swiss?!

That I am  smile  I was born there but I live in England now  smile  I'm impressed that you got that  big_smile  I assume you are at least part German from your name and the fact your comments are all over the de.po file  smile

Hehe, I am fully German living in Germany  big_smile
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.....


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#23 2010-06-21 12:24:33

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Lets make a block!

bigreader wrote:

sparks wrote:

johnnydean1 wrote:

I understand a bit of german e.g schwarz is black

good luck understanding Swiss...  tongue

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  tongue

Jens, that's pretty cool, and you speak great English  smile  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  tongue  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  big_smile  It was great and I thought you'd like to hear about it  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#24 2010-07-09 22:49:40

celloguy123
Scratcher
Registered: 2009-01-15
Posts: 100+

Re: Lets make a block!

Why are we talking about where jens lives?


http://internetometer.com/image/33068.png

Offline

 

#25 2010-07-10 08:46:54

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Lets make a block!

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.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer