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

#1 2009-12-29 09:34:04

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Scratch Connections: Javascript?

Is it possible to connect scratch with javascript? I'm most interested in the date/time features.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#2 2009-12-29 13:46:35

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Scratch Connections: Javascript?

javascript can't connect directly, but you can connect to an arbitrary socket with some form of bridge, such as:

http://stephengware.com/projects/javasocketbridge/

Offline

 

#3 2009-12-29 15:39:16

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Scratch Connections: Javascript?

You can connect to Scratch using any Programming Language that has networking.

Offline

 

#4 2009-12-30 08:40:55

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

e.g. python


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#5 2009-12-30 10:18:16

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Scratch Connections: Javascript?

markyparky56 wrote:

e.g. python

so does that mean no?


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#6 2009-12-31 04:31:04

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

I dont know, depends what your going to try to do with javascript and scratch. The scratch applet is a .jar file and requires java, but i geuss your meaning to link it in with the programing. I dont know, but its likely you can link them.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#7 2009-12-31 15:38:00

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Scratch Connections: Javascript?

If you can get networking with Javascript then sure, it's possible.

Offline

 

#8 2010-01-01 07:09:49

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

i think its possible, but maybe not, we'll have to find out.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#9 2010-01-01 10:34:04

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Scratch Connections: Javascript?

Actually, JavaScript can use sockets, via ActiveX - it's a Microsoft extension to JavaScript, it's unsafe, but possible.


Converting my Scratch projects to Python!

Offline

 

#10 2010-01-01 11:01:03

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Scratch Connections: Javascript?

what do you mean by unsafe? Viruses? Crashing the computer? Destroying Scratch?


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#11 2010-01-01 12:39:35

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Scratch Connections: Javascript?

Some ActiveX's may be viruses.


Converting my Scratch projects to Python!

Offline

 

#12 2010-01-01 13:04:07

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

hmmm... dangerous, but is it possible to scan it before you do it?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#13 2010-01-01 18:07:26

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Scratch Connections: Javascript?

See the link chalkmarrow posted - it's genius (!!!) and when I find some time I'm going to do something reeeaaallly cool with it xD

This Scratch-JavaScript connection is so cool because this allows Scratch to do a lot of web based stuff with a very easy to learn and pre-installed on every system language  smile  smile  And you could just share your scripts on a webpage... (click the link and watch Scratch be magic...)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#14 2010-01-02 07:13:20

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

I see its very intresting, but i dont see how thats helpful, but then... iv not really learnt any html or java yet,


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#15 2010-01-02 10:45:51

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Scratch Connections: Javascript?

then check out the HTML/Website Building Topic in Inspiration and More. It should be on the front page still...


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#16 2010-01-02 10:48:44

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Scratch Connections: Javascript?

JSO wrote:

See the link chalkmarrow posted - it's genius (!!!) and when I find some time I'm going to do something reeeaaallly cool with it xD

This Scratch-JavaScript connection is so cool because this allows Scratch to do a lot of web based stuff with a very easy to learn and pre-installed on every system language  smile  smile  And you could just share your scripts on a webpage... (click the link and watch Scratch be magic...)

How would you use it though? It talks about putting a script in an HTML document. I wish it wouldn't need a download though...


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#17 2010-01-03 07:33:44

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

16Skittles wrote:

then check out the HTML/Website Building Topic in Inspiration and More. It should be on the front page still...

I cant find it.  sad


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#18 2010-01-03 15:37:33

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Scratch Connections: Javascript?


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#19 2010-01-10 12:59:01

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Scratch Connections: Javascript?

It is possible to get the date and time right in scratch...
Well, in streak. There is a date/time block in streak 0.2.
If you want it in scratch itself, and are up for some hacking,
then tell me and I'll give you the code.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#20 2010-01-10 14:11:09

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Scratch Connections: Javascript?

Try sending malformed packet to remote sensor connection socket. It works 100%. Or Shift-click "R" in "Scratch" logo.


Converting my Scratch projects to Python!

Offline

 

#21 2010-01-16 10:14:43

blackbird1676
Scratcher
Registered: 2009-06-21
Posts: 20

Re: Scratch Connections: Javascript?

well ive been thinking bout this recently too it gets converted to java or python at some point because thats what the server runs


We must secure the existence of our people and a future for white children!! I am not skinhead nor any other Organization.

Offline

 

#22 2010-01-16 12:56:30

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

blackbird1676 wrote:

well ive been thinking bout this recently too it gets converted to java or python at some point because thats what the server runs

I dont see why it would go to python, the project viewer is Java-something, i think it acts as a complier for the .sb code. I have no idea how they're coded though, if i try to open it in a text-editor it gets all mucked up because its not in plain text or something.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#23 2010-01-16 13:13:28

blackbird1676
Scratcher
Registered: 2009-06-21
Posts: 20

Re: Scratch Connections: Javascript?

scratch is just a Squeak GUI as in its coded like this (i cant code squeak too well so ill just use english/basic/c cross  smile ) dim blockimput as vars
blockimput = (<block>.<blockinputbox1>)
if <blockname>.blockposition = (x=110)(y=-110) then sprite.xposition = (currentxpos + blockimpput)*/i used step block is what im demoing)\*


We must secure the existence of our people and a future for white children!! I am not skinhead nor any other Organization.

Offline

 

#24 2010-01-16 13:18:42

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Scratch Connections: Javascript?

blackbird1676 wrote:

scratch is just a Squeak GUI as in its coded like this (i cant code squeak too well so ill just use english/basic/c cross  smile  ) dim blockimput as vars
blockimput = (<block>.<blockinputbox1>)
if <blockname>.blockposition = (x=110)(y=-110) then sprite.xposition = (currentxpos + blockimpput)*/i used step block is what im demoing)\*

Are you sure? Scratch was coded in Squeak, yes, but im not sure about it being a squeak GUI...

Last edited by markyparky56 (2010-01-16 13:19:02)


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#25 2010-01-16 14:33:01

blackbird1676
Scratcher
Registered: 2009-06-21
Posts: 20

Re: Scratch Connections: Javascript?

yah pretty much so its like a code overlay ive even


We must secure the existence of our people and a future for white children!! I am not skinhead nor any other Organization.

Offline

 

Board footer