Mouse Class - MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

In general, a user runs a JSAPI script by selecting Commands > Run Command. However, you
can use this function in an ActionScript script to call a JSAPI command directly. If you use
in a script on Frame 1 of your file, the command executes when the SWF file
MMExecute()
is loaded.
For more information on the JSAPI, see www.macromedia.com/go/jsapi_info_en.
Example
The following command returns an array of objects in the library:
var libe:Array = MMExecute("fl.getDocumentDOM().library.items;");
trace(libe.length + " items in library");

Mouse class

Availability
Flash Player 5.
Description
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 (see
pointer" on page
Method summary for the Mouse class
Method
Mouse.addListener()
Mouse.hide()
Mouse.removeListener()
Mouse.show()
Listener summary for the Mouse class
Method
Mouse.onMouseDown
Mouse.onMouseMove
Mouse.onMouseUp
Mouse.onMouseWheel
476
Chapter 12: ActionScript Dictionary
94).
Description
Registers an object to receive
onMouseUp
Hides the mouse pointer in the SWF file.
Removes an object that was registered with
Displays the mouse pointer in the SWF file.
Description
Notified when the mouse button is pressed down.
Notified when the mouse button is moved.
Notified when the mouse button is released.
Notified when the user rolls the mouse wheel.
onMouseDown
notification.
"Creating a custom mouse
,
, and
onMouseMove
.
addListener()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Table of Contents