패키지 | mx.managers |
클래스 | public class CursorManager |
상속 | CursorManager Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
For example, if your application performs processing that requires the user to wait until the processing completes, you can change the cursor so that it reflects the waiting period. In this case, you can change the cursor to an hourglass or other image.
You also might want to change the cursor to provide feedback to the user to indicate the actions that the user can perform. For example, you can use one cursor image to indicate that user input is enabled, and another to indicate that input is disabled. You can use a JPEG, GIF, PNG, or SVG image, a Sprite object, or a SWF file as the cursor image.
All methods and properties of the CursorManager are static, so you do not need to create an instance of it.
In AIR, each mx.core.Window instance uses its own instance of the CursorManager class.
Instead of directly referencing the static methods and properties of the CursorManager class,
use the Window.cursorManager
property to reference the CursorManager instance
for the Window instance.
기타 예제
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
currentCursorID : int [정적]
ID of the current custom cursor,
or NO_CURSOR if the system cursor is showing. | CursorManager | ||
currentCursorXOffset : Number [정적]
The x offset of the custom cursor, in pixels,
relative to the mouse pointer. | CursorManager | ||
currentCursorYOffset : Number [정적]
The y offset of the custom cursor, in pixels,
relative to the mouse pointer. | CursorManager |
메서드 | 정의 주체 | ||
---|---|---|---|
getInstance():ICursorManager [정적]
Each mx.core.Window instance in an AIR application has its own CursorManager instance. | CursorManager | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
[정적]
Makes the cursor invisible. | CursorManager | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
[정적]
Removes all of the cursors from the cursor list
and restores the system cursor. | CursorManager | ||
[정적]
Removes the busy cursor from the cursor list. | CursorManager | ||
[정적]
Removes a cursor from the cursor list. | CursorManager | ||
[정적]
Displays the busy cursor. | CursorManager | ||
[정적]
Creates a new cursor and sets an optional priority for the cursor. | CursorManager | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
[정적]
Makes the cursor visible. | CursorManager | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object |
스타일은 일반적이거나 특정 테마와 연결되어 있을 수 있습니다. 일반적인 스타일인 경우 모든 테마와 함께 사용할 수 있지만, 특정 테마와 연결된 스타일인 경우 응용 프로그램이 해당 테마를 사용하는 경우에만 스타일을 사용할 수 있습니다.
스타일 | 설명 | 정의 주체 | ||
---|---|---|---|---|
busyCursor | 유형: Class CSS 상속: 아니요 언어 버전: ActionScript 3.0 제품 버전: Flex 3 런타임 버전: Flash9, AIR 1.1 The skin for the busy cursor. 기본값: mx.skins.halo.BusyCursor . | CursorManager | ||
busyCursorBackground | 유형: Class CSS 상속: 아니요 언어 버전: ActionScript 3.0 제품 버전: Flex 3 런타임 버전: Flash9, AIR 1.1 The class to use as the skin for the busy cursor background. The default value is the "cursorStretch" symbol from the Assets.swf file. | CursorManager |
상수 | 정의 주체 | ||
---|---|---|---|
NO_CURSOR : int = 0 [정적]
Constant that is the value of currentCursorID property
when there is no cursor managed by the CursorManager and therefore
the system cursor is being displayed. | CursorManager |
currentCursorID | 속성 |
currentCursorXOffset | 속성 |
currentCursorXOffset:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The x offset of the custom cursor, in pixels, relative to the mouse pointer.
기본값: 0.
구현
public static function get currentCursorXOffset():Number
public static function set currentCursorXOffset(value:Number):void
currentCursorYOffset | 속성 |
currentCursorYOffset:Number
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The y offset of the custom cursor, in pixels, relative to the mouse pointer.
기본값: 0.
구현
public static function get currentCursorYOffset():Number
public static function set currentCursorYOffset(value:Number):void
getInstance | () | 메서드 |
public static function getInstance():ICursorManager
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Each mx.core.Window instance in an AIR application has its own CursorManager instance. This method returns the CursorManager instance for the main Window instance.
반환값ICursorManager — The CursorManager instance for the main Window instance in an AIR application.
|
hideCursor | () | 메서드 |
public static function hideCursor():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Makes the cursor invisible.
Cursor visibility is not reference-counted.
A single call to the hideCursor()
method
always hides the cursor regardless of how many calls
to the showCursor()
method were made.
Calling this method does not affect the system cursor.
Use the Mouse.show()
and
Mouse.hide()
methods to directly
control the system cursor.
removeAllCursors | () | 메서드 |
public static function removeAllCursors():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes all of the cursors from the cursor list and restores the system cursor.
removeBusyCursor | () | 메서드 |
public static function removeBusyCursor():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes the busy cursor from the cursor list.
If other busy cursor requests are still active in the cursor list,
which means you called the setBusyCursor()
method more than once,
a busy cursor does not disappear until you remove
all busy cursors from the list.
removeCursor | () | 메서드 |
public static function removeCursor(cursorID:int):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes a cursor from the cursor list. If the cursor being removed is the currently displayed cursor, the CursorManager displays the next cursor in the list, if one exists. If the list becomes empty, the CursorManager displays the default system cursor.
매개 변수
cursorID:int — ID of cursor to remove.
|
setBusyCursor | () | 메서드 |
public static function setBusyCursor():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Displays the busy cursor.
The busy cursor has a priority of CursorManagerPriority.LOW.
Therefore, if the cursor list contains a cursor
with a higher priority, the busy cursor is not displayed
until you remove the higher priority cursor.
To create a busy cursor at a higher priority level,
use the setCursor()
method.
setCursor | () | 메서드 |
public static function setCursor(cursorClass:Class, priority:int = 2, xOffset:Number = 0, yOffset:Number = 0):int
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Creates a new cursor and sets an optional priority for the cursor. Adds the new cursor to the cursor list.
매개 변수
cursorClass:Class — Class of the cursor to display.
| |
priority:int (default = 2 ) — Integer that specifies
the priority level of the cursor.
Possible values are CursorManagerPriority.HIGH ,
CursorManagerPriority.MEDIUM , and CursorManagerPriority.LOW .
| |
xOffset:Number (default = 0 ) — Number that specifies the x offset
of the cursor, in pixels, relative to the mouse pointer.
| |
yOffset:Number (default = 0 ) — Number that specifies the y offset
of the cursor, in pixels, relative to the mouse pointer.
|
int — The ID of the cursor.
|
관련 API 요소
showCursor | () | 메서드 |
public static function showCursor():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Makes the cursor visible.
Cursor visibility is not reference-counted.
A single call to the showCursor()
method
always shows the cursor regardless of how many calls
to the hideCursor()
method were made.
Calling this method does not affect the system cursor.
Use the Mouse.show()
and
Mouse.hide()
methods to directly
control the system cursor.
NO_CURSOR | 상수 |
public static const NO_CURSOR:int = 0
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constant that is the value of currentCursorID
property
when there is no cursor managed by the CursorManager and therefore
the system cursor is being displayed.
Tue Jun 12 2018, 03:17 PM Z