Example
The following code displays the name of the screen that captured the mouse event in the Output
panel.
on(mouseDown) {
trace("Mouse down event on: " + eventObj.target._name);
}
Screen.mouseDownSomewhere
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
on(mouseDownSomewhere) {
// your code here
}
listenerObject = new Object();
listenerObject.mouseDownSomewhere = function(eventObject){
// insert your code here
}
screenObj.addEventListener("mouseDownSomewhere", listenerObject)
Description
Event; broadcast when the mouse button is pressed, but not necessarily over the specified screen.
When the event is triggered, it automatically passes an event object (
Each event object has properties that contain information about the event. You can use these
properties to write code that handles the event. For more information, see
class" on page
415.
Screen.mouseMove
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
on(mouseMove) {
// your code here
}
listenerObject = new Object();
listenerObject.mouseMove = function(eventObject){
// insert your code here
}
screenObj.addEventListener("mouseMove", listenerObject)
662
Chapter 6: Components Dictionary
) to the handler.
eventObj
"EventDispatcher
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?