Documentation

Parameters

NameDescription
Parameter nameParameter description
listener The javascript listener waiting for the flash events.
interval Time interval between updates, in milliseconds.
useHandCursor 0 to hide the hand when hovering the video.
bgcolor The background color
buffer The number of seconds to buffer. By default set to 5.
useexternalinterface 1 to use ExternalInterface to update the javascript listener.

Javascript

SetVariableDescription
Parameter nameParameter description
method:setUrl Change the url of the FLV file to read.
method:play Plays the video.
method:pause Pauses the video.
method:stop Stops the player.
method:setPosition Changes to position of the player (milliseconds).
method:setVolume Changes the volume (100 by default).
method:loadMovieOnTop Loads an image or a swf at the top of the video.
method:unloadMovieOnTop Unloads an image or a swf at the defined layer.

Handling of the element loaded at the top of the video

It is possible to load some images or SWF on the top of the video. The allowed image formats depend on the Flash plugin version installed on the browser. The non-progressive JPEG will work most of the time.

The loading of an image requires 4 parameters:

// The image is loaded at depth 1 and is aligned in the top left corner 
document.getElementById("myFlash").SetVariable("method:loadMovieOnTop", "logo.jpg|1|0|0");
 
// The image is loaded at depth 4 and is aligned in the right bottom corner with 
document.getElementById("myFlash").SetVariable("method:loadMovieOnTop", "logo.jpg|4|-5|-5");
 
// The image is loaded at depth 32 at center 
document.getElementById("myFlash").SetVariable("method:loadMovieOnTop", "logo.jpg|32||");

For the alignment, an empty parameter means at center. If it is positive, the position is top left. If it is negative (-0 is possible), the position is bottom right.

Listener properties

PropertyDescription
Listener propertyParameter description
url The URL of the video.
bytesTotal The number of total bytes.
bytesLoaded The number of bytes loaded.
bufferTime The maximum size of the buffer.
bufferLength The actual size of the buffer.
position The video position in milliseconds.
duration The video duration in milliseconds.
isPlaying Tells whether the movie is playing or not.
volume Shows the volume.

Events

EventDescription
Listener eventEvent description
onInit Initialization of the Flash, the player is ready.
onClick The user clicks on the video.
onKeyUp The user clicks on the keyboard. The key code is sent as parameter.
onFinish The video is ended.
onUpdate Update of the listener.

Pub