Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch to Javascript converter
- Pixiedust115
-
5 posts
Scratch to Javascript converter
I agree on a java script converter, but there is an alternative. Tynker is another coding software that uses the same blocks as Scratch (with a few others), but can convert to JavaScript and Python. Just saying.
————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————
————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
Not really. I agree on a java script converter, but there is an alternative. Tynker is another coding software that uses the same blocks as Scratch (with a few others), but can convert to JavaScript and Python. Just saying.
————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————<>————
From what I can tell, Tynker assumes functions like “blast()” are already defined. While this is fine for teaching syntax, you can't actually run the code without importing extra code.
- havefunbefun
-
44 posts
Scratch to Javascript converter
I think that Scratch is unique for the block coding, so if you want to do Java script, you may wanna find another website.


- Charles12310
-
1000+ posts
Scratch to Javascript converter
Scratch is not the same as JavaScript. Scratch has stuff JavaScript doesn't. JavaScript has stuff that Scratch doesn't. In fact, there is NO other existing programming language that Scratch can convert their codes into. Therefore, you won't get your support from me.
Last edited by Charles12310 (Dec. 13, 2017 23:00:37)
- MathlyCat
-
1000+ posts
Scratch to Javascript converter
I recommend to develop a legitimate reason to not support through the process of finding evidence to support points like: Scratch is not the same as JavaScript. Scratch has stuff JavaScript doesn't. JavaScript has stuff that Scratch doesn't. In fact, there is NO other existing programming language that Scratch can convert their codes into. Therefore, you won't get your support from me.
…NO other existing programming language[s] that Scratch can convert their codes into.
Now as it seems, you clearly have completely jumped to a conclusion as fast as you could. In reality:
1. Scratch is developed in ActionScript, which is itself another programming language Source.
2. The conversion is not impossible, but is an extraneous amount of work. The implementation of such would be interesting and somewhat useful in the future. However, there are other resources that work similar to Scratch, but are indeed based on JavaScript code. (Code.org should have most of these)
- EPICPIKAGUY
-
100+ posts
Scratch to Javascript converter
…JavaScript can be hard to learn…
Not really. As a person who knows JavaScript, I’d say it’s one of the easiest languages to learn.
Still, I can kind of see your point. Actually, this could be a future project of mine!
- EPICPIKAGUY
-
100+ posts
Scratch to Javascript converter
I recommend to develop a legitimate reason to not support through the process of finding evidence to support points like: Scratch is not the same as JavaScript. Scratch has stuff JavaScript doesn't. JavaScript has stuff that Scratch doesn't. In fact, there is NO other existing programming language that Scratch can convert their codes into. Therefore, you won't get your support from me.…NO other existing programming language[s] that Scratch can convert their codes into.
Now as it seems, you clearly have completely jumped to a conclusion as fast as you could. In reality:
1. Scratch is developed in ActionScript, which is itself another programming language Source.
2. The conversion is not impossible, but is an extraneous amount of work. The implementation of such would be interesting and somewhat useful in the future. However, there are other resources that work similar to Scratch, but are indeed based on JavaScript code. (Code.org should have most of these)
Agreed. Also, while it’s true that JavaScript has some stuff Scratch doesn’t, Javascript has everything that Scratch has, and more. JS has:
Basic programming structures (if, while, etc.)
Sound support (though it’s not as simple as scratch)
Pen capabilities (ctx.rect, ctx.lineTo, etc.)
Sensing (microphone, camera, gyroscope, etc.)
Operators
Variables
Lists (arrays)
And Functions are pretty much “more blocks”
It shouldn’t be impossible. Scratch is really basic compared to actual programming languages.
- Sheep_maker
-
1000+ posts
Scratch to Javascript converter
JavaScript can't really display or detect anything by itself, so the converter'll have to output an HTML file instead (with the JS in a script tag and the images and sounds in data URIs, or have the JS in a separate file zipped together with the HTML and images)
Would the converter insert a green flag (+ turbo mode) and stop sign button or would the project run with the green flag clicked automatically on load (and can be clicked again by reloading the page)?
Would the converter insert a green flag (+ turbo mode) and stop sign button or would the project run with the green flag clicked automatically on load (and can be clicked again by reloading the page)?
- -ShadowOfTheFuture-
-
1000+ posts
Scratch to Javascript converter
I thought that Scratch doesn't really convert that well to JS.
- Khoeckman
-
1 post
Scratch to Javascript converter
for the if <> then block in javaScript it seems like this:
The <script></script> thing is an example how i should work.
<!DOCTYPE html> <html> <body> <p id="text"></p> <script> var x = 5; var y = 10 if (x < y) { document.getElementById("text").innerHTML =" true"; } </script> </body> </html>
- Enzopig88
-
5 posts
Scratch to Javascript converter
me too i would love to see a java to scratch and a scratch to java because i fond a emulator of the x86 prossert in java scrpit call pcjs it open source here the link https://www.pcjs.org/ and i want a see what it would look like i scratch and billd of the block and add more feters plz scratch make a convert.

- DaEpikDude
-
1000+ posts
Scratch to Javascript converter
https://www.pcjs.org/ and i want a see what it would look like i scratch and billd of the block and add more feters plz scratch make a convert.java ≠ javascript me too i would love to see a java to scratch and a scratch to java because i fond a emulator of the x86 prossert in java scrpit call pcjs it open source here the link
- Botcho_Otkho
-
1000+ posts
Scratch to Javascript converter
No support at all. Scratch is a programming language by its own, and doesn't have a Python or Javascript version. If you want to program with blocks and then know the code, use Code.org. And what if you make a change with Javascript and Scratch doesn't have that feature, while Javascript has? And, last but not least, Scratch has things that JS hasn't, and JS has things Scratch hasn't.
Last edited by Botcho_Otkho (April 14, 2018 11:24:30)
- neeb132
-
500+ posts
Scratch to Javascript converter
What would be the equivalent of
Not compatible, I think.
?
Not compatible, I think.
- jokebookservice1
-
1000+ posts
Scratch to Javascript converter
You could do a quick What would be the equivalent of?
Not compatible, I think.
setTimeout(furtherActions, time);
Or, you could rewrite that with asynchronous functions and promises, and then utilise the “await” keyword to make the actions in the callback appear in a separate statement below the “wait block” equivalent.
Scratch is definitely compatible with JavaScript, for it's implemented in ActionScript, which is a dialect of ECMAScript (and so is JavaScript).
- EPICPIKAGUY
-
100+ posts
Scratch to Javascript converter
No support. Scratch hasn't a Javascript version with all blocks translated,and for example,how would you convert a costume or a sound? That's just impossible.
All “Costumes” can be represented by various image formats (e.g. png), which javascript supports. To draw them, you just need a <canvas> element.
Audio is a bit harder, but still doable. Just append <audio> elements to the dom and load in the audio files (e.g. mp3).
I’ve made javascript programs with sound and images. It’s possible.
- spraybottle101
-
1 post
Scratch to Javascript converter
The problem is changing costumes that will be hard but great idea
- EPICPIKAGUY
-
100+ posts
Scratch to Javascript converter
The problem is changing costumes that will be hard but great idea
Changing costumes isn't too hard either.
On the javascript game I'm working on right now, each object has a variable called “fill” that dictates its “costume”.
To change the fill, I do something like this:
this.fill = imageOne;
this.fill = imageTwo;
- PuffballYoshi
-
2 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 Think So
- Discussion Forums
- » Suggestions
-
» Scratch to Javascript converter