Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Leopard: Edit Scratch projects as JavaScript code
- Nibblet_A
-
3 posts
Leopard: Edit Scratch projects as JavaScript code
Hello, I am working on a scratch game, and Leopard keeps saying that there is an error, I have tried it about 5 times, and not worked. I have saved the game on a file and uploaded it, but every time I try it keeps saying that it does not work. What should I do? I am trying to get the code to convert it into C#, so I can make my game without future glitches because when I was making a villager mechanic, the code for moving my player started glitching. i removed some of the code and it worked. I don't know what to do now. So, what should I do?
- ninjaMAR
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
(#1044)What's the error? What's the code?
Hello, I am working on a scratch game, and Leopard keeps saying that there is an error, I have tried it about 5 times, and not worked. I have saved the game on a file and uploaded it, but every time I try it keeps saying that it does not work. What should I do? I am trying to get the code to convert it into C#, so I can make my game without future glitches because when I was making a villager mechanic, the code for moving my player started glitching. i removed some of the code and it worked. I don't know what to do now. So, what should I do?
- Nibblet_A
-
3 posts
Leopard: Edit Scratch projects as JavaScript code
The code is the villager sprite moving
when I receive [start game]
forever
if <(pick random (backdrop number) to (10)) = [3] then
forever
if <[backdrop number] = [3]> then
show
walk X
if<not <[backdrop number] = [3]>>then
hide
This is about 5 more times. (Not a block)
define walk X
change x by (pick random (-1) to (-10))
wait 5 seconds
change x by (pick random (1) to (10))
forever
if<<touching color [#C3DDF9] ?>>then
change x by ()10
- gdesmedt78
-
8 posts
Leopard: Edit Scratch projects as JavaScript code
yooooooooo i really want to convert this project https://scratch.mit.edu/projects/911956787/ but leopard isnt letting me
Why?

Why?
- e_d_g_a_r
-
24 posts
Leopard: Edit Scratch projects as JavaScript code
why cant i convert https://scratch.mit.edu/projects/948573479/? it is from version 3.0 and has no extentions
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
Hey everyone! I really appreciate everybody posting the errors and issues that they are running into with Leopard. Lots of people have been asking for help, and I haven't always been able to provide enough.
So today we're starting a new program. It's called Leopard Mentors.
I'm assembling a small team of mentors who know JavaScript and are willing to help fellow Scratchers who are trying to convert their projects with Leopard. That way, when you run into an issue while converting a project, there will always be someone available who can help.
The Leopard Mentors will be available to discuss your project with you 1-on-1 on Github.
If you're interested in becoming a mentor, you can do so here. Many Leopard users could benefit from your JavaScript expertise!
With the introduction of this new program, I will also personally be dedicating more time to supporting Leopard users 1-on-1.
P.S. There's another big announcement coming soon. Make sure to watch this space!
So today we're starting a new program. It's called Leopard Mentors.
I'm assembling a small team of mentors who know JavaScript and are willing to help fellow Scratchers who are trying to convert their projects with Leopard. That way, when you run into an issue while converting a project, there will always be someone available who can help.
If you run into an issue with your project on Leopard, you can…
- Continue posting here
- Make a “cleanup crew” request on Github
The Leopard Mentors will be available to discuss your project with you 1-on-1 on Github.
If you're interested in becoming a mentor, you can do so here. Many Leopard users could benefit from your JavaScript expertise!
With the introduction of this new program, I will also personally be dedicating more time to supporting Leopard users 1-on-1.
P.S. There's another big announcement coming soon. Make sure to watch this space!
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
HUGE NEWS!
Today marks the biggest update Leopard has ever received since it was first created.
The Leopard website now provides a custom “Leopard Editor”. It's a JavaScript code editor that is designed to look and feel just like Scratch. To use it, choose the “Leopard Editor” option when converting your project:

You'll be taken to our new custom editor where you should feel right at home in a Scratch-like interface:

It's Scratch, but for JavaScript! Exactly as Leopard was always meant to be. Give it a try!
Today marks the biggest update Leopard has ever received since it was first created.
The Leopard website now provides a custom “Leopard Editor”. It's a JavaScript code editor that is designed to look and feel just like Scratch. To use it, choose the “Leopard Editor” option when converting your project:

You'll be taken to our new custom editor where you should feel right at home in a Scratch-like interface:

It's Scratch, but for JavaScript! Exactly as Leopard was always meant to be. Give it a try!
- Apfellord
-
100+ posts
Leopard: Edit Scratch projects as JavaScript code
Potential bug? I can't register an account in brave browser, as the birthday month field resets everytime I click away from it. I can set a date just fine, but clicking anywhere (including the register button) clears it again. Also, the current format is “January 2000”, while below the box it says that the format should be “YYYY-MM”.
Using Firefox, the Format is correct, where it's YYYY-MM, but typing in 1998-04 for example, always deletes the “0” after clicking away, which makes me unable to register.
Anyone else experiencing this?
Using Firefox, the Format is correct, where it's YYYY-MM, but typing in 1998-04 for example, always deletes the “0” after clicking away, which makes me unable to register.
Anyone else experiencing this?
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
This is really good to know. It seems like you're not the only one experiencing issues with the month input. I'll have to go back to the drawing board on that one. Thanks for the feedback. Potential bug? I can't register an account in brave browser, as the birthday month field resets everytime I click away from it. I can set a date just fine, but clicking anywhere (including the register button) clears it again. Also, the current format is “January 2000”, while below the box it says that the format should be “YYYY-MM”.
Using Firefox, the Format is correct, where it's YYYY-MM, but typing in 1998-04 for example, always deletes the “0” after clicking away, which makes me unable to register.
Anyone else experiencing this?

- cyclopian
-
2 posts
Leopard: Edit Scratch projects as JavaScript code
Hello, my project doesn't seem to be working with Leopard. It is unable to even be loaded into onto the leopard website. Tried a simpler project while using a basic custom my block that I created and it worked fine. Not really sure how to pinpoint the issue though. Thanks if anyone is able to help.
https://scratch.mit.edu/projects/879832396/editor/
https://scratch.mit.edu/projects/879832396/editor/
- e_d_g_a_r
-
24 posts
Leopard: Edit Scratch projects as JavaScript code
so i tried to upload a scratch sprite to the leopard editor and it said unathorized. how to fix?
- gdesmedt78
-
8 posts
Leopard: Edit Scratch projects as JavaScript code
HUGE NEWS!:O
Today marks the biggest update Leopard has ever received since it was first created.
The Leopard website now provides a custom “Leopard Editor”. It's a JavaScript code editor that is designed to look and feel just like Scratch. To use it, choose the “Leopard Editor” option when converting your project:
You'll be taken to our new custom editor where you should feel right at home in a Scratch-like interface:
It's Scratch, but for JavaScript! Exactly as Leopard was always meant to be. Give it a try!
- e_d_g_a_r
-
24 posts
Leopard: Edit Scratch projects as JavaScript code
it says there is a limit on size but the limit there does not mach the one on scratch. why?
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
https://scratch.mit.edu/projects/1020143851/This is a strange one… it doesn't convert correctly on the website but it does convert correctly using the sb-edit tool on my local computer. I'll look into what's wrong with the website, but in the meantime, here's your converted project: https://codesandbox.io/p/sandbox/network-test-n8vtpjWhy doesn't this project work
It still seems to be lagging and not behaving exactly the same as on Scratch, but this is a good first step.

- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
Hey cyclopian! I have mostly good news Hello, my project doesn't seem to be working with Leopard. It is unable to even be loaded into onto the leopard website. Tried a simpler project while using a basic custom my block that I created and it worked fine. Not really sure how to pinpoint the issue though. Thanks if anyone is able to help.with a hint of bad. (See the next post for an update. This is now mostly good with a hint of uncertain.)
https://scratch.mit.edu/projects/879832396/editor/
The good news is that I solved the issue with your project being converted. There was a project conversion time limit of 5 seconds, and because your project had sooo many assets to upload, it wasn't finishing in time and you were left with a blank loading spinner. I increased the time limit to 60 seconds, so now there is plenty of time and your project converts successfully! You can see it here.
The bad news is that now when you click the green flag to load the project, it actually sorta breaks the Leopard website.

I will take a look at how I can fix the second issue, and then you should be good to go. I'm pretty sure there's something called “database pooling” that will help. I just don't know anything about it, so I have some research to do.
Update: I looked into this and made it happen. See the post below. I'm crossing my fingers and hoping this works.
Last edited by PullJosh (July 11, 2024 17:54:21)
- PullJosh
-
1000+ posts
Leopard: Edit Scratch projects as JavaScript code
Update for @cyclopian (and everyone): I just did a bunch of research and work and ended up setting up a connection pooling system that hopefully means you can create and load large projects with lots of assets in the Leopard editor.
I am super unsure about this. I think it's working and everything seems okay but stuff might break. If you see any issues with the Leopard website, please please please let me know. But. In an ideal world, you can now create larger projects and everything should just work more smoothly than before!
I am super unsure about this. I think it's working and everything seems okay but stuff might break. If you see any issues with the Leopard website, please please please let me know. But. In an ideal world, you can now create larger projects and everything should just work more smoothly than before!