OLPCities/Mouse: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:


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_mouse.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:




Line 25: Line 23:
</pre>
</pre>


You need to create an object of this Class to use the properties of the Class [[Sprites]]:
You need to create an object of this Class to use the properties of the Class [[OLPCities/Sprites|Sprites]]:
<pre>
<pre>
onmouseover [=String]
onmouseover [=String]
Line 34: Line 32:


The "prefix" to be used will be that of the Sprite.
The "prefix" to be used will be that of the Sprite.

[[Category:OLPCities_JavaScript_Libraries]]

Latest revision as of 03:45, 14 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_mouse.js

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

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

To create an "object" of the Class:

myMouse=Ms_initmouse(); 

You need to create an object of this Class to use the properties of the Class Sprites:

onmouseover [=String]        
onmouseout [=String}           
onclickdown [=String]         
onclickup [=String] 

The "prefix" to be used will be that of the Sprite.