I'm trying to make the docs work for LzCursor, and want to get something
that compiles in all runtimes, including swf9.
The current splitting into a "Interface" and "service" does not wok because
you can't redeclare methods from the 'interface'
class to be vars in the "service" class.
So I'd like to propose just a lzCursorService class which is implemented as
below. This compiles
and seems to run in swf, dhtml, and swf9.
public class LzCursorService {
/** The cursor service. Also available as the global
* <code>LzCursor</code>.
*
* @type LzCursorService
* @keywords readonly
* @devnote this should be a public getter to enforce readonly
*/
public static var LzCursor:LzCursorService = new LzCursorService();
/** @access private
* @devnote AS3 does not allow private constructors, so we need the
* error
*/
public function LzCursorService() {
if (LzCursorService.LzCursor) {
throw new Error("There can be only one LzCursor");
}
}
/**
* Shows or hides the hand cursor for all clickable views.
* @param Boolean show: true shows the hand cursor for buttons, false
hides it
*/
function showHandCursor(show:Boolean) {
LzMouseKernel.showHandCursor(show);
}
/**
* Sets the cursor to a resource
* @param String resource: The resource to use as the cursor.
*/
function setCursorGlobal(resource:String) {
LzMouseKernel.setCursorGlobal(resource);
}
/**
* Prevents the cursor from being changed until unlock is called.
*/
function lock() {
LzMouseKernel.lock();
}
/**
* Restores the default cursor.
*/
function unlock() {
LzMouseKernel.unlock();
}
/**
* Restores the default cursor if there is no locked cursor on
* the screen.
*/
function restoreCursor() {
LzMouseKernel.restoreCursor();
}
}
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]