Mouse


Object
    |
    +-Mouse

public class Mouse
extends Object

The Mouse class is a top-level class whose properties and methods you can access without using a constructor. You can use the methods of the Mouse class to hide and show the mouse pointer (cursor) in the SWF file. The mouse pointer is visible by default, but you can hide it and implement a custom pointer that you create using a movie clip .

A Flash application can only monitor mouse events that occur within its focus. A Flash application cannot detect mouse events in another application.

Availability: ActionScript 1.0; Flash Player 5

Property summary

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


Event summary

Event

Description

onMouseDown = function() {}

Notified when the mouse is pressed.

onMouseMove = function() {}

Notified when the mouse moves.

onMouseUp = function() {}

Notified when the mouse is released.

onMouseWheel = function([delta:Number], [scrollTarget:Object]) {}

Notified when the user rolls the mouse wheel.

Method summary

Modifiers

Signature

Description

static

addListener(listener:Object) : Void

Registers an object to receive notifications of the onMouseDown, onMouseMove, onMouseUp, and onMouseWheel listeners.

static

hide() : Number

Hides the pointer in a SWF file.

static

removeListener(listener:Object) : Boolean

Removes an object that was previously registered with addListener().

static

show() : Number

Displays the mouse pointer in a SWF file.

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)



Flash CS3