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

#276 2010-10-06 03:13:45

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

Re: Lets make a new Scratch viewer!

Ok lets get PHP to turn it into hex. But can we then also make it able to take a copy of that code and put that into the player. This is beacuse some devices don't support PHP!


You can now reach me on Twitter @johnnydean1_

Offline

 

#277 2010-10-06 03:43:30

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

johnnydean1 wrote:

Ok lets get PHP to turn it into hex. But can we then also make it able to take a copy of that code and put that into the player. This is beacuse some devices don't support PHP!

We have to use PHP or JS. Now I prefer PHP because it is widely supported unlike JS as people turn it off on their browser. And PHP is easy to get the hand of an learn!  big_smile
Thats why I want the viewer to be decoded in PHP!  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#278 2010-10-06 04:55:39

wei2912
Scratcher
Registered: 2010-05-09
Posts: 100+

Re: Lets make a new Scratch viewer!

I think JS. PHP is mostly used for servers.


Waiting for Scratch 2.0...

Offline

 

#279 2010-10-06 08:37:25

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

wei2912 wrote:

I think JS. PHP is mostly used for servers.

Yes, people, PHP is on the sever, NOT the client. So The client does not have to run PHP. I was thinking that we use PHP to read the file into an array of bytes (like I did above.) Then parse it into an array of objects and send it to JS, but I don't really know how to send it. NXIII???  tongue

EDIT: Typo.

Last edited by MathWizz (2010-10-06 08:42:11)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#280 2010-10-06 09:14:19

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

I think PHP will be better to understand the file. maybe parce it into our 'text based scratch' language. Remember the [say 'hello'] ect... sort of blocks.  big_smile
Then we get JS and HTML5 to understand that!  roll


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#281 2010-10-06 09:39:11

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

Daffy22 wrote:

I think PHP will be better to understand the file. maybe parce it into our 'text based scratch' language. Remember the [say 'hello'] ect... sort of blocks.  big_smile
Then we get JS and HTML5 to understand that!  roll

Yeah! That's what I'm trying to do. I've almost got the project info done!  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#282 2010-10-06 12:00:56

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Lets make a new Scratch viewer!

Daffy22 wrote:

okay lets do one step at a time:
1. converting project to hex (tick)
2. undertstanding all the numbers. (need to do)

If we get JS to write a temp file (can they write to files - it's been a while since I used JS) Could we even get PHP to turn it to hex then wer have string with the hex version of the file!  big_smile

In IE you can use JS with an ActiveX control to write to a file. But hardly anybody uses that useless browser for anything other than downloading Firefox, so it's not much help. I can post the code if you want though.


/* No comment */

Offline

 

#283 2010-10-06 12:16:46

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Lets make a new Scratch viewer!

TheSuccessor wrote:

Something I've been working on (not finished yet, but view source to see what I'm doing): HTMLgames.

Bump.


/* No comment */

Offline

 

#284 2010-10-06 14:26:59

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

Re: Lets make a new Scratch viewer!

I saw looks good!


You can now reach me on Twitter @johnnydean1_

Offline

 

#285 2010-10-06 16:56:36

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

Re: Lets make a new Scratch viewer!

MathWizz wrote:

wei2912 wrote:

I think JS. PHP is mostly used for servers.

Yes, people, PHP is on the sever, NOT the client. So The client does not have to run PHP. I was thinking that we use PHP to read the file into an array of bytes (like I did above.) Then parse it into an array of objects and send it to JS, but I don't really know how to send it. NXIII???  tongue

EDIT: Typo.

I would say, actually, that you might be better off sending a GIANT byte array to JS and parsing it there; that way you don't need to convert PHP objects to JS objects with nothing but strings.


nXIII

Offline

 

#286 2010-10-06 17:07:28

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

nXIII wrote:

MathWizz wrote:

wei2912 wrote:

I think JS. PHP is mostly used for servers.

Yes, people, PHP is on the sever, NOT the client. So The client does not have to run PHP. I was thinking that we use PHP to read the file into an array of bytes (like I did above.) Then parse it into an array of objects and send it to JS, but I don't really know how to send it. NXIII???  tongue

EDIT: Typo.

I would say, actually, that you might be better off sending a GIANT byte array to JS and parsing it there; that way you don't need to convert PHP objects to JS objects with nothing but strings.

Oh, that makes sense, but I was wondering how you would send anything to JS with PHP...


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#287 2010-10-06 17:33:49

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

Re: Lets make a new Scratch viewer!

MathWizz wrote:

nXIII wrote:

MathWizz wrote:


Yes, people, PHP is on the sever, NOT the client. So The client does not have to run PHP. I was thinking that we use PHP to read the file into an array of bytes (like I did above.) Then parse it into an array of objects and send it to JS, but I don't really know how to send it. NXIII???  tongue

EDIT: Typo.

I would say, actually, that you might be better off sending a GIANT byte array to JS and parsing it there; that way you don't need to convert PHP objects to JS objects with nothing but strings.

Oh, that makes sense, but I was wondering how you would send anything to JS with PHP...

I wrote a function that converts strings, arrays, dictionaries and numbers, but you can't really send user classes.


nXIII

Offline

 

#288 2010-10-06 17:54:17

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: Lets make a new Scratch viewer!

Hello. I just wanted to know how much progress you guys have made.  smile


__m. .m__ KILROY WAS HERE
        U

Offline

 

#289 2010-10-06 18:05:25

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

Re: Lets make a new Scratch viewer!

militarydudes wrote:

Hello. I just wanted to know how much progress you guys have made.  smile

Check the Progress forum on our website!  big_smile  (link in my sig)


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

Offline

 

#290 2010-10-06 18:20:21

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

nXIII wrote:

MathWizz wrote:

nXIII wrote:

I would say, actually, that you might be better off sending a GIANT byte array to JS and parsing it there; that way you don't need to convert PHP objects to JS objects with nothing but strings.

Oh, that makes sense, but I was wondering how you would send anything to JS with PHP...

I wrote a function that converts strings, arrays, dictionaries and numbers, but you can't really send user classes.

AHHHH!!!! I KNOW THAT! Oops... I had caps on.  tongue  Lets say I have the string "Hello World!", how would I send that to JS?

EDIT: I figured it out. I'm still a n00b at PHP.  tongue

Last edited by MathWizz (2010-10-06 18:42:59)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#291 2010-10-06 19:03:01

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

Re: Lets make a new Scratch viewer!

MathWizz wrote:

nXIII wrote:

MathWizz wrote:

Oh, that makes sense, but I was wondering how you would send anything to JS with PHP...

I wrote a function that converts strings, arrays, dictionaries and numbers, but you can't really send user classes.

AHHHH!!!! I KNOW THAT! Oops... I had caps on.  tongue  Lets say I have the string "Hello World!", how would I send that to JS?

EDIT: I figured it out. I'm still a n00b at PHP.  tongue

I use

Code:

echo '"' . $str . '"'

Is that what you're doing?

Last edited by nXIII (2010-10-06 19:03:15)


nXIII

Offline

 

#292 2010-10-06 19:04:33

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

nXIII wrote:

MathWizz wrote:

nXIII wrote:


I wrote a function that converts strings, arrays, dictionaries and numbers, but you can't really send user classes.

AHHHH!!!! I KNOW THAT! Oops... I had caps on.  tongue  Lets say I have the string "Hello World!", how would I send that to JS?

EDIT: I figured it out. I'm still a n00b at PHP.  tongue

I use

Code:

echo '"' . $str . '"'

Is that what you're doing?

Yep...


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#293 2010-10-07 00:58:06

Jet7889
Scratcher
Registered: 2008-02-18
Posts: 100+

Re: Lets make a new Scratch viewer!

Umm... I could help... If i do say so myself im very good at HTML. I pretty much got done with html before anyone in my HTML class


Excuse me for dropping off the face of the planet.....
http://internetometer.com/image/16545.png

Offline

 

#294 2010-10-07 11:16:12

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Lets make a new Scratch viewer!

okay, so we think we can decode the sb file. Has anyone done that yet?
PS: IE is awsome, but I do prefer firefox on certain occations but to be honest IE has some good features FF doesn't have!  big_smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#295 2010-10-07 11:22:20

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

Re: Lets make a new Scratch viewer!

Daffy22 can you work on turning the .sb into hex please!
EDIT
Actually can you then turn a project into diffrent scripts

Last edited by johnnydean1 (2010-10-07 11:31:38)


You can now reach me on Twitter @johnnydean1_

Offline

 

#296 2010-10-07 11:22:25

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

Daffy22 wrote:

okay, so we think we can decode the sb file. Has anyone done that yet?
PS: IE is awsome, but I do prefer firefox on certain occations but to be honest IE has some good features FF doesn't have!  big_smile

I'm working on it...  big_smile  Try chrome! That's my all-time favorite!


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#297 2010-10-07 11:23:45

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

Re: Lets make a new Scratch viewer!

Hey MathWizz can you reguarly post you code!


You can now reach me on Twitter @johnnydean1_

Offline

 

#298 2010-10-07 11:26:24

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Lets make a new Scratch viewer!

johnnydean1 wrote:

Daffy22 can you work on turning the .sb into hex please!

I DID THAT!!!!

This is my code so far.

Last edited by MathWizz (2010-10-07 11:28:42)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#299 2010-10-07 11:32:06

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

Re: Lets make a new Scratch viewer!

edited


You can now reach me on Twitter @johnnydean1_

Offline

 

#300 2010-10-07 17:55:20

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Lets make a new Scratch viewer!

I can learn a single language in a few days. Which should I start?
PHP or JavaScript? Which do we need more right now?


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

Board footer