OLPCities/Core: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This library is part of the <b>Gamelib</b>, created by Scott Porter and updated by Brent Silby. Gamelib is available under the terms of the [http://www.gnu.org/copyleft/lgpl.html GNU Library General Public Licence].
This library is part of the <b>Gamelib</b>, created by Scott Porter and updated by Brent Silby. Gamelib is available under the terms of the [http://www.gnu.org/copyleft/lgpl.html GNU Library General Public Licence].


To use this library (this Class) add this line to the <HEAD> section of the web page of the Lot:
To use this library (this Class) add one line to the <HEAD> section of the web page of the Lot.
<pre>
You need to click this link and "save" the library at the same folder of the web page or put it at another folder at the same server and make a reference:
<script language="Javascript" src="http://www.dmu.com/olpc/gamelib_core.js"></script>
</pre>

Better to click this link and "save" the library at the same folder of the web page or put it at another folder at the same server and make a reference:


[http://www.dmu.com/olpc/gamelib_core.js gamelib_core.js ]
[http://www.dmu.com/olpc/gamelib_core.js gamelib_core.js ]


if you put it at the same folder, the line would be:
If you put it at the same folder, the line would be:
<pre>
<pre>
<script language="Javascript" src="gamelib_core.js"></script>
<script language="Javascript" src="gamelib_core.js"></script>
Line 19: Line 16:
==Methods==
==Methods==
<pre></pre>
<pre>
Gl_cookie(String) Constructor for a cookie

Gl_hook(String) Hooks a function to a "timer loop". The string passed is the actual
name of the function to be hooked.
Gl_preloader(String) Preload images.

Gl_scrollbars(String) If you are creating Lots also for IE and using frames and needs to hide
scrollbars, String will be: "no". Valid only for IE.

Gl_start() Starts the "timer loop".

Gl_stop() Stops the "timer loop" . All game functions and animation will cease.

Gl_unhook(String) Unhooks a function.

</pre>
[[Category:OLPCities_JavaScript_Libraries]]

Latest revision as of 23:39, 13 February 2007

This library is part of the Gamelib, created by Scott Porter and updated by Brent Silby. Gamelib is available under the terms of the GNU Library General Public Licence.

To use this library (this Class) add one line to the <HEAD> section of the web page of the Lot.

You need to click this link and "save" the library at the same folder of the web page or put it at another folder at the same server and make a reference:

gamelib_core.js

If you put it at the same folder, the line would be:

<script language="Javascript" src="gamelib_core.js"></script> 

You don't need to create an "object" of the Class because there will be only one object of it.


Methods

Gl_cookie(String)               Constructor for a cookie 

Gl_hook(String)                 Hooks a function to a "timer loop". The string passed is the actual 
                                name of the function to be hooked.  
 
Gl_preloader(String)            Preload images.  

Gl_scrollbars(String)          If you are creating Lots also for IE and using frames and needs to hide
                               scrollbars, String will be: "no". Valid only for IE.   

Gl_start()                     Starts the "timer loop".  

Gl_stop()                      Stops the "timer loop" . All game functions and animation will cease. 

Gl_unhook(String)              Unhooks a function.