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

#1 2007-11-21 22:10:34

mdausmann
Scratcher
Registered: 2007-11-18
Posts: 2

JavaScript Access to Scratch Variables in game applet?

Hi

Is it possible to use javascript to access in-game variables contained within my scratch game when the game is embedded into the page as an applet?

to give you context, I am trying to achieve this..

1) game is embedded in web page
2) player completes game
3) Form on the page extracts the players score from the applet/game and puts into a field on the form
4) User enters their name on the form
5) User submits the form, sending their name and their score to the web server

Clearly point 3) is the tricky part.  Is the Scratch applet/game a black box?  what can I do to it/get from it using Javascript?

Michael

Offline

 

#2 2007-11-25 21:24:12

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: JavaScript Access to Scratch Variables in game applet?

That's a wonderful idea Michael. Unfortunately at this time this is not possible but this shouldn't be too hard to achieve. I'll bring it up in the next Scratch Team meeting :-)


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

Board footer