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

#1 2010-09-29 10:35:02

richwhite
Scratcher
Registered: 2010-09-29
Posts: 13

Grab variable from HTML embeded .sb file (via ScratchApplet.jar)

Is it possible to grab a .sb variable (game score) from an html embeded Scratch project (via ScratchApplet.jar) on my web site .... I am wanting to grab the variables value (from the Scratch embeded game) to post (via a html form).


... Thanks in advance !

- Rich
=========================

Offline

 

#2 2010-09-29 10:51:33

richwhite
Scratcher
Registered: 2010-09-29
Posts: 13

Re: Grab variable from HTML embeded .sb file (via ScratchApplet.jar)

A better description to what I am wanting to do:

* I have embeded a Scratch project - via html - into a web page (via ScratchApplet.jar etc.) and all works well !

* This project has a "Score" variable

* I would like to pass the "Score" variable value to an element of a web form so students can post their score to our high scores database (I would manage this processing via PHP/MySQL)

Offline

 

#3 2010-09-29 10:59:17

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

Re: Grab variable from HTML embeded .sb file (via ScratchApplet.jar)

richwhite wrote:

A better description to what I am wanting to do:

* I have embeded a Scratch project - via html - into a web page (via ScratchApplet.jar etc.) and all works well !

* This project has a "Score" variable

* I would like to pass the "Score" variable value to an element of a web form so students can post their score to our high scores database (I would manage this processing via PHP/MySQL)

I am pretty experienced with html and php and I don't think this is possible with out editing the javaplayer to do so. Sorry but I can't help here.  sad


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

Offline

 

#4 2010-09-29 11:53:21

richwhite
Scratcher
Registered: 2010-09-29
Posts: 13

Re: Grab variable from HTML embeded .sb file (via ScratchApplet.jar)

I am looking at the Build Your Own Blocks Scratch stuff ... not sure if there is a way to create a "Post Variable to web (script)" block method .... I am kinda going out on a limb with this one 


http://wiki.scratch.mit.edu/wiki/Build_Your_Own_Blocks_%28BYOB%29

Offline

 

#5 2010-09-29 18:10:16

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: Grab variable from HTML embeded .sb file (via ScratchApplet.jar)

No, there isn't. And BYOB doesn't work online anyways.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

Board footer