MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 519

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

When the event is triggered, it automatically passes an event object (
handler. Each event object has properties that contain information about the event. You can use
these properties to write code that handles the event. The
two additional properties:
A reference to the broadcasting object.
target
The string
type
For more information, see
Example
The following example uses an object listener to determine the playhead position
(
Media.playheadTime
var myPlayerListener = new Object();
myPlayerListener.change = function(eventObject){
var myPosition = myPlayer.playheadTime;
var myPercentPosition = (myPosition/totalTime);
}
myPlayer.addEventListener("change", myPlayerListener);
See also
Media.playing
Media.click
Applies to
MediaController, MediaPlayback
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
listenerObject = new Object();
listenerObject.click = function(eventObject){
// insert your code here
}
myMedia.addEventListener("click", listenerObject)
Description
Event; broadcast when the user clicks the Play/Pause button. The detail field can be used to
determine which button was clicked. The
The string
detail
A reference to the MediaController or MediaPlayback instance.
target
The string
type
520
Chapter 6: Components Dictionary
, which indicates the type of event.
"change"
"EventDispatcher class" on page
), from which the percentage complete can be calculated:
,
Media.pause()
or
"pause"
"play"
.
"click"
Media.change
415.
event object has the following properties:
Media.click
.
) to the
eventObject
event's event object has

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents