OLPCities/Mouse over and click: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 2: Line 2:


The Class [[Sprites]] has four properties that we use:
The Class [[Sprites]] has four properties that we use:

<pre>

onmouseover [=String] The string is the function name to be called when the mouse
pointer has moved over the sprite. This CAN include arguments so
mySprite.onmouseover="dosomething(x,y,z)" would pass the variables x,y,z
to the function dosomething

onmouseout [=String} The string is the function name to be called

onclickdown [=String] The string is the function name to be called

onclickup [=String] The string is the function name to be called
</pre>

Revision as of 21:10, 25 September 2006

There are two very usual resources that are used when we are working using Sprites: the "mouse-over" and the "mouse-click".

The Class Sprites has four properties that we use:


onmouseover [=String]         The string is the function name to be called when the mouse
                              pointer has moved over the sprite. This CAN include arguments so
                              mySprite.onmouseover="dosomething(x,y,z)" would pass the variables x,y,z 
                              to the function dosomething  

onmouseout [=String}         The string is the function name to be called   

onclickdown [=String]        The string is the function name to be called  

onclickup [=String]          The string is the function name to be called