View comments | RSS feed

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, __proto__, prototype, __resolve


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:String]) {}

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, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

Comments


BrandStyler said on Dec 7, 2005 at 6:06 PM :
Is it possible to handle mouse wheel click (middle mouse button click)???
peterd_mm said on Jan 23, 2006 at 2:49 PM :
BrandStyler,

No, it is not possible to detect the scroll-wheel click.

Peter
unlike.dk said on Feb 12, 2006 at 2:12 PM :
Is there any way that I can control the mouse ... Move the cursor to a
spicific location?
erickmtl said on Mar 31, 2006 at 2:38 PM :
you can know if the mouse wheel btn is down or up with :
Key.isDown(4)
stalker81 said on Apr 25, 2007 at 7:29 AM :
Is there any way to tell the the cursor has changed from the default arrow state to the hand cursor?
For example to add a roll over function to an <a href> link.

Zoltan

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002427.html