Mouse in Anark Studio 2.5

Holds information related to the mouse.

Inherits from:

Self Properties

name type description
cursor Number Cursor type.
cursorOverride Number Override cursor type.
x Number (read only) X location.
y Number (read only) Y location.

Instance Properties

name type description
constructor Object A reference to the constructor class for the current object instance. [from Object]
prototype Object The prototype for a class. [from Object]

Instance Methods

name returns description
hasOwnProperty(propertyOrMethodName) Boolean Determines if the object/instance itself has the named property or method. [from Object]
isPrototypeOf(instanceToTest) Boolean Determines if the calling object prototype is in the inheritance chain for the supplied argument. [from Object]
propertyIsEnumerable(propertyOrMethodName) Boolean Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration. [from Object]
toLocaleString() String For most objects, the same as toString() unless explicitly overridden. [from Object]
toString() String Returns a string representation of the object. [from Object]
valueOf() String Returns the internal this value of the object. [from Object]

Description

The Mouse object is available at any time to obtain the coordinates of the mouse within the presentation window, and to access the cursor and the state of the mouse buttons. Because it is a global object, it can be accessed directly.

Mouse Example

function onMouseOver () 
{
	// Turn the cursor into the pointer finger.
	Mouse.cursor = 4; 
} 
function onMouseOut () 
{ 
	// Reset the cursor to the system default. 
	Mouse.cursor = 0; 
} 
function onDetach () 
{ 
	// Just in case onMouseOut didn't get called,  
	// reset the cursor. 
	Mouse.cursor = 0 
}