OK, everyone. I vote for #2, and i have some code. In fact, I have a whole implementation of scratch (one one canvas). It, however does not read the scratch files. It takes javascript. So, my suggestion is to make a converter in PHP that takes a scratch file and outputs javascript. My version is here.
Last edited by paulpsicle (2011-08-29 20:36:53)
Offline
Wait. Is there a way to convert a Scratch-file into workable javascript or PHP code (say, a very long string)?
Offline
I think that this is a very good project for the community to work on. I see that somebody has made a sample html viewer for us to try out, but I want to see what the php code looks like to decode the .sb project. Us GE developers (go everywhere) want people to develop in regular scratch and upload their projects to GE to be decoded into an xml file, which they can edit it on their device.
Offline
johnnydean1 wrote:
The offical HTML Scratch viewer thread
Updates
Update Post
Poll
Do we:
1.) Make a HTML squeak player
2.) Just make a Scratch viewer (Start again)
3.) Continue progressResults
Note: These will be updated until the poll has ended
1.) 1
2.) 2
3.) 1How to add a vote:
Add a new forum post that says:Poll vote
I choose number:Team
johnnydean1
TheSuccessor
Daffy22
ScratchReallyROCKS
midnightleopard
MathWizz
Pwiter
ProgrammingFreak
Taneb
Anyone else who wants to join with HTML/JavaScript knowledge)Website
Website is located here
Info
I dreamed a dream... that one day the Scratch viewer could be used on any web browser. I then thought about this idea and came up with this the
HTML Scratch ViewerOriginal Post
How about we use a combination of:
HTML
PHP
J-Script
And others
To make a new Scratch viewer.
It would not use Flash, Squeak, Java or any others.
If we design it to scale to the screen then anything we view it on would be able to view Scratch projects.
If we made it using these we could view any project on a:
I-Pod
I-Phone
DS (with browser game)
DSi
DSi XL
3DS (When browser released)
Wii
Xbox
BlackBerry
Other smartphones (Windows Phone, Nokia, Android, etc.)
iPad
Other tablets (Samsung Tab, HP Slate, etc.)
And anything else with a web browser!
So can we make it?Bob the Builder said:
Yes we can!lol
Offline
And, beyond just the script, we also need to be able to get the sprite images in through PHP too.
Offline
Harakou wrote:
Uh, I hate to be the one to say this, but let me point out that JavaScript performance on mobile browsers is less than desirable, to put it lightly. Even if the viewer was actually displayed correctly, the speed would be mind-numbingly slow.

Offline
Laternenpfahl wrote:
Harakou wrote:
Uh, I hate to be the one to say this, but let me point out that JavaScript performance on mobile browsers is less than desirable, to put it lightly. Even if the viewer was actually displayed correctly, the speed would be mind-numbingly slow.
Was that written in JavaScript? It's not too slow!
Offline
johnnydean1 wrote:
The offical HTML Scratch viewer thread
Website
Website is located here
this link isn't valid.
Offline
how's this going?
Is it dead?
Last edited by midnightleopard (2011-10-16 18:03:36)
Offline
Hey, I can't get to the site... Did you guys make it private, change addresses or something like that? I get the "not published" weebly error"...
Offline
Site Not Published
The site you are looking for has not been published
If you are the owner of the site, you can fix this message by publishing your site to this address.


Offline
Once again, IS THIS STILL GOING? I am good at HTML5 now. Real good.
Offline
MathWizz wrote:
Well... Not really. I have all the code and everything. Maybe we could restart this? The things I'm stuck on are reading floats and reading images from the scratch file.
Hey MathWizz, nice to see you again. I was just thinking... I do have an interest in starting it up again.
When we started I knew nothing, but over the last year or so I have become fluent in JavaScript and nearly fluent in PHP. It seemed as though the newest members of this viewer organization have corrupted it, but I think there is still hope. Maybe we should start a new thread?
Also, we should absoultely stick to one canvas for the project just because multi-canvas would be much harder.
I have been porting some old scratch projects into canvas and have come up with a very efficient way of doing it. Perhaps we could just make an automated version of that?
-MidnightLeopard
Offline
midnightleopard wrote:
Hey MathWizz, nice to see you again. I was just thinking... I do have an interest in starting it up again.
When we started I knew nothing, but over the last year or so I have become fluent in JavaScript and nearly fluent in PHP. It seemed as though the newest members of this viewer organization have corrupted it, but I think there is still hope. Maybe we should start a new thread?
Also, we should absoultely stick to one canvas for the project just because multi-canvas would be much harder.
I have been porting some old scratch projects into canvas and have come up with a very efficient way of doing it. Perhaps we could just make an automated version of that?
-MidnightLeopard
Hey! I agree with making a new thread. Maybe even change the name to JsScratch or something. I have started playing with Jens morphic.js and I think that should be what we use. Right now I have the viewer opening files from my server with XMLHttpRequest and reading them on the spot.
Offline
MathWizz wrote:
midnightleopard wrote:
Hey MathWizz, nice to see you again. I was just thinking... I do have an interest in starting it up again.
When we started I knew nothing, but over the last year or so I have become fluent in JavaScript and nearly fluent in PHP. It seemed as though the newest members of this viewer organization have corrupted it, but I think there is still hope. Maybe we should start a new thread?
Also, we should absoultely stick to one canvas for the project just because multi-canvas would be much harder.
I have been porting some old scratch projects into canvas and have come up with a very efficient way of doing it. Perhaps we could just make an automated version of that?
-MidnightLeopardHey! I agree with making a new thread. Maybe even change the name to JsScratch or something. I have started playing with Jens morphic.js and I think that should be what we use. Right now I have the viewer opening files from my server with XMLHttpRequest and reading them on the spot.
![]()
Hmm. Jens things appears to be a squeak IDE for canvas. Very cool. So you are using XMLHttpRequest to read scratch project files from your server? The part of this whole thing that has confused me most is reading the files. When I open them with notepad I just get tons of binary data.
I understand that there is documentation for this gibberish here.
It seems to be that the image files for the sprites are in binary data urls. That should be very easy to draw onto a cavnas, but difficult to read. I think once we can figure that out, we're all set.
I will start a new thread.
Offline
MathWizz wrote:
midnightleopard wrote:
Hey MathWizz, nice to see you again. I was just thinking... I do have an interest in starting it up again.
When we started I knew nothing, but over the last year or so I have become fluent in JavaScript and nearly fluent in PHP. It seemed as though the newest members of this viewer organization have corrupted it, but I think there is still hope. Maybe we should start a new thread?
Also, we should absoultely stick to one canvas for the project just because multi-canvas would be much harder.
I have been porting some old scratch projects into canvas and have come up with a very efficient way of doing it. Perhaps we could just make an automated version of that?
-MidnightLeopardHey! I agree with making a new thread. Maybe even change the name to JsScratch or something. I have started playing with Jens morphic.js and I think that should be what we use. Right now I have the viewer opening files from my server with XMLHttpRequest and reading them on the spot.
![]()
New thread located here
EDIT: Removed a violent rant on the sixty-second rule
Last edited by midnightleopard (2011-10-27 21:21:32)
Offline
ZeroLuck wrote:
I can help you to read the sb files.
Our offical thread has moved to http://scratch.mit.edu/forums/viewtopic.php?id=79044. I can read the files and compile everything into a giant array of objects but the problem I have is reading floats and images.
Offline