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

#76 2012-10-25 22:17:34

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

pwiter wrote:

Pitusky12 wrote:

pwiter wrote:


just use the mac github app. It's at mac.github.com

yeah but is it in the same jscratch github repository the website?

The jscratch github repo is the website. *facepalm*

okay sorry,i couldnt edit it because i didnt find index.html


Scratch 2.0 Beta Tester  wink

Offline

 

#77 2012-10-25 22:19:14

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

pwiter wrote:


The easiest way to edit it is to download the github windows app. It is located here windows.github.com. After that clone the jscratch repo that appears. Now you can edit it.

okay,im using a mac but no problem.

Oh, good, you have a Mac! Because Safari on a Mac has a special feature: Native drag and drop BETWEEN WINDOWS!!!

So, if you have two projects open, but you want to have a very long script in one project, but it is in another, you can just drag the script into the other window, and it will show up there.

Thats cool thanks for telling me the feature i didnt know and i edited index.html in github jscratch repo


Scratch 2.0 Beta Tester  wink

Offline

 

#78 2012-10-25 22:19:18

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.

EDIT: I'll put it in the jScratch GItHub so that everybody automaticly has a copy of it.

Last edited by GP1 (2012-10-25 22:27:04)


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#79 2012-10-25 22:26:10

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.

Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?


Scratch 2.0 Beta Tester  wink

Offline

 

#80 2012-10-25 22:31:16

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

GP1 wrote:

Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.

Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?

Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.

The .sb2 format is just a JSON, right?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#81 2012-10-25 22:34:23

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

GP1 wrote:


Oh cool, you found that! I used to use that for a while, but I lost it when I wiped out my computer. We can REALLY use this for a player.

Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?

Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.

The .sb2 format is just a JSON, right?

Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?


Scratch 2.0 Beta Tester  wink

Offline

 

#82 2012-10-25 22:40:47

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

GP1 wrote:

Pitusky12 wrote:

Yeah,we'll run .sb2 projects (new scratch 2.0 file format) and convert the block codes that are in the zip file to a .js file.Later i'll post a .sb2 project in github we can use for test project in the player okay?

Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.

The .sb2 format is just a JSON, right?

Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?

Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.

Last edited by GP1 (2012-10-25 22:41:44)


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#83 2012-10-25 22:54:01

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

GP1 wrote:

Okay, you do that. We can also make a PHP script to change the format of the .sb2 format into that JS format, by changing the header to JavaScript, then echo the converted out.

The .sb2 format is just a JSON, right?

Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?

Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.

im checking it out in github

Last edited by Pitusky12 (2012-10-25 22:55:46)


Scratch 2.0 Beta Tester  wink

Offline

 

#84 2012-10-25 23:03:01

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

GP1 wrote:

Pitusky12 wrote:


Okay ,Yes the .sb2 format contains a .json file .But i gotta do it later or tommorrow because its late and im using my iPad okay?

Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.

im checking it out in github

Okay. Also, I think I messed up with my sync and I might have deleted some text from index.html. Can somebody go check that out for me?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#85 2012-10-25 23:05:56

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code :     this.finit = function(){
        if(localStorage.files === undefined){
            localStorage.files = "{}";

And i found out the PHP project reader is for .sb2 projects because i found this code :


//    localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
//    localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
    this._setFile = function(f){localStorage.files = JSON.stringify(f)}
    this._getFile = function(){return JSON.parse(localStorage.files)}
    this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
    this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
    this.contentsOfFile = function(n){
        this.finit();
//        return this.files[n];
//        var f = this.files;
        return this.files[n];


This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)

In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js

I hope this helps us


Scratch 2.0 Beta Tester  wink

Offline

 

#86 2012-10-25 23:09:42

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

GP1 wrote:


Ok. I found a project reader in PHP, but I dont know if it is in .sb2 or the Scratch 1.4 update.

im checking it out in github

Okay. Also, I think I messed up with my sync and I might have deleted some text from index.html. Can somebody go check that out for me?

sure ill check that out.


Scratch 2.0 Beta Tester  wink

Offline

 

#87 2012-10-25 23:13:16

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

The page is now brown (jscratch.tk)

Edit: Fixed it to gray and other bug.

Last edited by Pitusky12 (2012-10-25 23:28:52)


Scratch 2.0 Beta Tester  wink

Offline

 

#88 2012-10-25 23:55:01

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

How do I upload a file to the Files Section on github?


Scratch 2.0 Beta Tester  wink

Offline

 

#89 2012-10-26 00:41:52

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

How do I upload a file to the Files Section on github?

Are you using GitHub for Mac, or Git Bash?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#90 2012-10-26 00:44:28

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.


Scratch 2.0 Beta Tester  wink

Offline

 

#91 2012-10-26 00:46:12

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

How do I upload a file to the Files Section on github?

Are you using GitHub for Mac, or Git Bash?

im using github for mac


Scratch 2.0 Beta Tester  wink

Offline

 

#92 2012-10-26 00:48:58

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code :     this.finit = function(){
        if(localStorage.files === undefined){
            localStorage.files = "{}";

And i found out the PHP project reader is for .sb2 projects because i found this code :


//    localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
//    localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
    this._setFile = function(f){localStorage.files = JSON.stringify(f)}
    this._getFile = function(){return JSON.parse(localStorage.files)}
    this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
    this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
    this.contentsOfFile = function(n){
        this.finit();
//        return this.files[n];
//        var f = this.files;
        return this.files[n];


This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)

In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js

I hope this helps us

Maybe its .sb2, because the way im looking at it, it parses the file INTO a JSON, because javascript can natively read JSON and XML. When it saves the file, it turns the JSON into a string.

And the localdata can store projects, but not from your computer. Localdata is like a cookie, but dont get carried through with the http request. It doesnt actually get files from your computer. However, you still can do the file:/// protocall.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#93 2012-10-26 00:50:16

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

GP1 wrote:

Pitusky12 wrote:

How do I upload a file to the Files Section on github?

Are you using GitHub for Mac, or Git Bash?

im using github for mac

Do you have the jScratch repo cloned and synced to your Mac? If not, do it.

After you sync it to your clone, you need to find the local repository. For me (in Windows), it was in My Documents>>GitHub, and in a folder called jScratch. Put all your files somewhere in that folder. Go back to the GitHub folder. For me, it had a new button, and when i clicked it a commit box appeared. I typed in my commit message, and clicked Commit. That part might be different on Macs. After that, click Sync and wait untill your commit shows up in the Commits section.

Last edited by GP1 (2012-10-26 01:09:35)


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#94 2012-10-26 01:10:44

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

We are just making the VIEWER here, NOT the editor, correct?


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#95 2012-10-26 07:43:16

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

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.

Actually, you can't use it at all unless it has a license which allows redistribution and derivative works.


nXIII

Offline

 

#96 2012-10-26 09:30:31

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

nXIII wrote:

Pitusky12 wrote:

We're not gonna copy other peoples scratch viewer,we can use some code but not all,okay?
Why? because we have to develop our own code but we can use a few not all.

Actually, you can't use it at all unless it has a license which allows redistribution and derivative works.

Yep, But there are some things wrong with the code, any way.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#97 2012-10-26 09:32:38

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

Pitusky12 wrote:

GP1 - The project reader in PHP you found i think its in .sb2 . To load the projects from your computer we can use this code :     this.finit = function(){
        if(localStorage.files === undefined){
            localStorage.files = "{}";

And i found out the PHP project reader is for .sb2 projects because i found this code :


//    localStorage.__defineGetter__("files", function(){return JSON.parse(localStorage._files)});
//    localStorage.__defineSetter__("files", function(v){localStorage._files = JSON.stringify(v)});
    this._setFile = function(f){localStorage.files = JSON.stringify(f)}
    this._getFile = function(){return JSON.parse(localStorage.files)}
    this.__defineSetter__("files", function(v){console.log(v); localStorage.files = JSON.stringify(v)});
    this.__defineGetter__("files", function(){return JSON.parse(localStorage.files)});
    this.contentsOfFile = function(n){
        this.finit();
//        return this.files[n];
//        var f = this.files;
        return this.files[n];


This code says .JSON because it reads .sb2 projects (Scratch 2.0 projects)

In Our Scratch 2.0 player we might have to convert new block codes like cloud variables in .js

I hope this helps us

Maybe its .sb2, because the way im looking at it, it parses the file INTO a JSON, because javascript can natively read JSON and XML. When it saves the file, it turns the JSON into a string.

And the localdata can store projects, but not from your computer. Localdata is like a cookie, but dont get carried through with the http request. It doesnt actually get files from your computer. However, you still can do the file:/// protocall.

Oh Thanks for the news ! Smartglass and surface are released im using internet explorer on xbox 360 ill keep you posted


Scratch 2.0 Beta Tester  wink

Offline

 

#98 2012-10-26 09:33:41

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

GP1 wrote:

We are just making the VIEWER here, NOT the editor, correct?

yeah were just making the viewer


Scratch 2.0 Beta Tester  wink

Offline

 

#99 2012-10-26 09:46:47

Pitusky12
Scratcher
Registered: 2011-09-21
Posts: 500+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

JsScratch Works in xbox


Scratch 2.0 Beta Tester  wink

Offline

 

#100 2012-10-26 09:52:13

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Scratch 2.0 Projects' Viewer Programmed In Javascript and HTML5

Pitusky12 wrote:

JsScratch Works in xbox

There is no reason why it wouldnt.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

Board footer