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

#1 2012-09-08 11:21:48

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

iJS - A javascript function library!

iJS is your new friend! It GREATLY speeds up developing, and helps save a lot of coding. Here's a comparison:

Code:

Regular JavaScript:

var thethingy = document.getElementById("emubody");
thethingy.innerHTML="Hi!";

Code:

iJS:

$_headersDeclare();
$_bodySet("Hi!");

It can also generate embed codes for flash as well as images. It will be coming out shortly.


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#2 2012-09-08 11:32:09

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: iJS - A javascript function library!

IJS code is really hard to understand...


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#3 2012-09-08 11:50:17

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: iJS - A javascript function library!

dvd4 wrote:

IJS code is really hard to understand...

Really?

I dont see how it's hard, look:


Code:

$_headersDeclare()



It basically tells iJS that there is a div with the id of "emubody" on the page, and you can use that to print stuff on.

Code:

$_headersDeclare("manual","id of the div to print stuff on")



It basically tells iJS that instead of a div with emubody, there is a custom div.

Code:

$_bodySet("blah blah")



Set's the text in the body to blah blah now the the emubody is set.

Code:

$_bodyAdd("blah blah")



Adds blah blah to what is currently in the emubody

Now, I keep referring to emubody. Emubody stands for Emulator Body. Now, since people sometimes DON'T include a body tag, javascript falls back to document.write. One thing., it is HORRENDOUS. It replaces EVERYTHING on the page. An emulator body is basically a div where anything iJS needs to write can write to.

However, you can use other tags that are similar:

$_elementAdd(elementasobject,"blah blah");

Adds blah blah to the defined element as an object.

There is A LOT more to iJS, as you will soon see!


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#4 2012-09-08 14:29:07

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: iJS - A javascript function library!

Servine wrote:

dvd4 wrote:

IJS code is really hard to understand...

Really?

I dont see how it's hard, look:


Code:

$_headersDeclare()



It basically tells iJS that there is a div with the id of "emubody" on the page, and you can use that to print stuff on.

Code:

$_headersDeclare("manual","id of the div to print stuff on")



It basically tells iJS that instead of a div with emubody, there is a custom div.

Code:

$_bodySet("blah blah")



Set's the text in the body to blah blah now the the emubody is set.

Code:

$_bodyAdd("blah blah")



Adds blah blah to what is currently in the emubody

Now, I keep referring to emubody. Emubody stands for Emulator Body. Now, since people sometimes DON'T include a body tag, javascript falls back to document.write. One thing., it is HORRENDOUS. It replaces EVERYTHING on the page. An emulator body is basically a div where anything iJS needs to write can write to.

However, you can use other tags that are similar:

$_elementAdd(elementasobject,"blah blah");

Adds blah blah to the defined element as an object.

There is A LOT more to iJS, as you will soon see!

oh,I see


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#5 2012-09-08 16:53:19

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: iJS - A javascript function library!

is that based off of jQuery?


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#6 2012-09-09 04:41:34

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: iJS - A javascript function library!

SJRCS_011 wrote:

is that based off of jQuery?

In now way, at all. jQuery seems to complex to me, even though w3 says its easy to learn


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

Board footer