Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch to Javascript converter
- kittycat841
-
100+ posts
Scratch to Javascript converter
Oh, hello!
I'm here to discuss a new feature that should be added to Scratch: A Scratch to Javascript converter!
Now, you may be thinking, how would this be useful?
I'll tell you why.
There are other applications out there, and most of them use JavaScript. JavaScript can be hard to learn, so why not make a converter? Then, Scratchers can take their project and put it into another application. This would make things a lot easier for scratchers.
Well?
I'm not keeping track of Supporters this time, so PLEASE give reasons why it should or shouldn't be added into Scratch.
Thanks for reading this.
I'm here to discuss a new feature that should be added to Scratch: A Scratch to Javascript converter!
Now, you may be thinking, how would this be useful?
I'll tell you why.
There are other applications out there, and most of them use JavaScript. JavaScript can be hard to learn, so why not make a converter? Then, Scratchers can take their project and put it into another application. This would make things a lot easier for scratchers.
Well?
I'm not keeping track of Supporters this time, so PLEASE give reasons why it should or shouldn't be added into Scratch.
Thanks for reading this.

- Sheep_maker
-
1000+ posts
Scratch to Javascript converter
You can't convert a costume into Javascript, I believe.
Would this be like a “download to computer as .js” button?
Would this be like a “download to computer as .js” button?
- Sigton
-
1000+ posts
Scratch to Javascript converter
The problem is Scratch doesn't function the same way as any other languages, and is often extremely difficult to represent Scratch code as text. For example, what would a sprite be in javascript? The backdrop, costumes, sounds and so on and so forth.
Sigton
Sigton
- -stache-
-
500+ posts
Scratch to Javascript converter
You can store it as a data: urI though You can't convert a costume into Javascript, I believe.
Would this be like a “download to computer as .js” button?
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
I disagree that most applications use JavaScript, that is mostly used on the we. For applications, Java is more common I elieve (though you can make JS apps via Electron).
Scratch code is representable as JSON, and so can be interpreted by JavaScript (Phosphorus).
So if it would just output phosphorus with the input being some JSON that could work, or perhaps instead of Phosphorus running the code for a project, it would output that code. e.g.
That could work
Scratch code is representable as JSON, and so can be interpreted by JavaScript (Phosphorus).
So if it would just output phosphorus with the input being some JSON that could work, or perhaps instead of Phosphorus running the code for a project, it would output that code. e.g.
/* Code to set-up canvas goes here */ Scratch.sprite.xPosition += 10; Scratch.refreshScreen(); //etc.
Last edited by jokebookservice1 (Sept. 17, 2016 19:06:46)
- Falcon1234567
-
20 posts
Scratch to Javascript converter
Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
- The4thPixel
-
1000+ posts
Scratch to Javascript converter
The Original Post is suggesting the exact opposite, a way to convert Scratch Blocks into JavaScript. Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
- Sigton
-
1000+ posts
Scratch to Javascript converter
JavaScript has a lot of features that Scratch doesn't, so this wouldn't really be possible. Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
Sigton
- ateesdalejr
-
100+ posts
Scratch to Javascript converter
The logic of this sentence makes me cry.JavaScript has a lot of features that Scratch doesn't, so this wouldn't really be possible. Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
Sigton
I believe this has been already done with phosphorus. It just runs the js. I'm sure if you asked someone nicely they could mess with it enough to produce a compiled output.
- jesseli2007
-
15 posts
Scratch to Javascript converter
I'm trying to convert this block:
if <> then
end
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
This isn't really the place to ask, but in JavaScript you would do I'm trying to convert this block:if <> then
end
if(){ }
You can drop the {} if there is only one statement.
Last edited by jokebookservice1 (Dec. 28, 2016 18:40:13)
- MegaApuTurkUltra
-
1000+ posts
Scratch to Javascript converter
Phosphorus is technically a Scratch to javascript converter 

- The4thPixel
-
1000+ posts
Scratch to Javascript converter
Support, if it's possible. I'd like to be able to download my games and upload them to gamejolt or something without having to worry about people remixing or cheating.
I'd also support a scratch to exe converter if it's possible.
I'd also support a scratch to exe converter if it's possible.
- Sigton
-
1000+ posts
Scratch to Javascript converter
The logic of this sentence makes me cry.They were asking about the other way round.
I believe this has been already done with phosphorus. It just runs the js. I'm sure if you asked someone nicely they could mess with it enough to produce a compiled output.
Sigton
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
A Scratch to Javascript converter!
phosphorus
They were asking about the other way round.I don't think they were.

- Sigton
-
1000+ posts
Scratch to Javascript converter
Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
I beg to differ I don't think they were.

Sigton
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
You quoted the wrong person in your post thenCan u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.I beg to differ I don't think they were.
Sigton

- Sigton
-
1000+ posts
Scratch to Javascript converter
The logic of this sentence makes me cry.JavaScript has a lot of features that Scratch doesn't, so this wouldn't really be possible. Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
Sigton
I believe this has been already done with phosphorus. It just runs the js. I'm sure if you asked someone nicely they could mess with it enough to produce a compiled output.
…no I didn't… You quoted the wrong person in your post then
Sigton
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
There us too much ambiguity. I feel like your post was quoted by ateesdalejr simply to mention that the logic of the post made little sense. I feel like the rest of the post was in reference to the OP.The logic of this sentence makes me cry.JavaScript has a lot of features that Scratch doesn't, so this wouldn't really be possible. Can u make javascript into scratchblocks using this?
Cos most games are in javascript and you can ‘watch and learn’ the code and how to recreate in scratch.
Sigton
I believe this has been already done with phosphorus. It just runs the js. I'm sure if you asked someone nicely they could mess with it enough to produce a compiled output.…no I didn't… You quoted the wrong person in your post then
Sigton
We will never know, however.
- nickeljorn
-
1000+ posts
Scratch to Javascript converter
Support! I was thinking of suggesting a “view code” option (Like on Code.Org) with several programming languages to choose from, such as JavaScript, Python, Ruby, etc.
- Discussion Forums
- » Suggestions
-
» Scratch to Javascript converter