Name

LzCursor — Provides methods for changing the mouse cursor.

Synopsis

JavaScript: LzCursor
Type: Object
Access: public
Topic: LFC.Services
Declared in: WEB-INF/lps/lfc/services/LzCursor.lzs

Description

The LzCursor service provides methods for changing the mouse cursor. For example:

 <canvas height="30">
   <resource name="waitcursor" src="../resources/lzwaitcursor_rsc.swf"/>
 
   <view bgcolor="yellow" cursor="waitcursor">
 
     <text>Roll over to change the cursor</text>
   </view>
 </canvas>
 

This example changes the cursor for 1/2 second when the button is clicked:

Example 14. Changing the cursor with LzCursor

 <canvas height="30">
 
   <resource name="waitcursor" src="../resources/lzwaitcursor_rsc.swf"/>
   <button onclick="setCursor()" text="Click me to change the cursor for 1/2 second">
     <method name="setCursor">
       LzCursor.setCursorGlobal('waitcursor');
       var del= new LzDelegate(LzCursor, 'unlock');
       LzTimer.addTimer(del, 500);
     </method>
   </button>
 </canvas>
 
 

Details

Static Properties (5)

lock
static public var lock;
Prevents the cursor from being changed until unlock is called.
restoreCursor
static private var restoreCursor;
This function restores the default cursor if there is no locked cursor on the screen.
setCursorGlobal
static public var setCursorGlobal;
Sets the cursor to a resource
showHandCursor
static public var showHandCursor;
Shows or hides the hand cursor for all clickable views.
unlock
static public var unlock;
Restores the default cursor.

JavaScript Synopsis

public var LzCursor = { ... };