AFComponents.com

FLV List Gallery V. 1.3.1 API Docs



Properties

Name Type Description
autoPlay Boolean Property indicates whether playback starts immediately (true).
autoRewind Boolean Property indicates whether video is rewound at the end (true).
autoSize Boolean Property indicates whether the gallery is resized to match the video size (true).
background Boolean Property indicates whether gallery's background is displayed (true).
backgroundColor Number A Hexadecimal Color Value of the gallery's background.
border Boolean Property indicates whether player's border is displayed (true).
borderColor Number A Hexadecimal Color Value of the gallery’s border.
bufferTime Number Number of seconds of data currently in the buffer.
buttonBackgroundColor Object Property defines button's background gradient color.
  1. topColor:Number – A Hexadecimal color value that defines top color of button's background gradient.
  2. bottomColor:Number – A Hexadecimal color value that defines bottom color of button's background gradient.
buttonBackgroundOverColor Number Property defines button's background gradient color onRollOver state.
  1. topColor:Number – A Hexadecimal color value that defines top color of button's background gradient.
  2. bottomColor:Number – A Hexadecimal color value that defines bottom color of button's background gradient.
buttonBorderColor Object Property defines button's border color.
  1. normal:Number – A Hexadecimal color value that defines button's border color.
  2. over:Number – A Hexadecimal color value that defines button's border color onRollOver state.
buttonIconColor Number Property defines button's icon color.
  1. normal:Number – A Hexadecimal color value that defines button's icon color.
  2. over:Number – A Hexadecimal color value that defines button's icon color onRollOver state.
content Object Object that that defines video properties.
  1. path:String – Property indicates path to the flv video file.
  2. title:String – Property indicates video title.
contentRSS String Property indicates a path to the RSS 2.0 Feed.
contentXML String Property indicates a path to the XML File.

Sample XML file:
http://www.afcomponents.com/components/flv_list_gallery/content.xml
controls String Property that indicates whether or not gallery controls are displayed.
  1. on:String
  2. off:String
  3. autohide:String
cuePoints Array Can only be set in the flash IDE, not through AS. To set through AS use method addASCuePoint();
description String Property indicates whether or not gallery's video description is displayed.
  1. on:String
  2. off:String
  3. autohide:String
descriptionColor Number A Hexadecimal Color Value of the video description window background. Description background is always displayed with 50% opacity.
descriptionFont String Property indicates font. Please note that specified font is not embedded automatically. In order to prevent problems use “safe fonts” or embed fonts in your flash movie.
descriptionFontColor Number A Hexadecimal Color Value of the video description text.
descriptionFontSize Number Property defines description font size.
draggerColor Number Property defines playhead color.
  1. normal:Number – A Hexadecimal color value of gallery's playhead.
  2. over:Number – A Hexadecimal color value of gallery's playhead onRollOver state.
glassOverlay Boolean Property indicates whether (navigation) glass overlay is displayed (true).
glassOverlayAlpha Number Property (0-100) that indicates (navigation) glass overlay transparency.
glassOverlayColor Number A Hexadecimal Color Value of the gallery's (navigation) glass overlay.
isLive Boolean Property indicates whether stream is live (true).
listItemBackgroundColor Object Property defines list item's background color.
  1. normal:Number – A Hexadecimal color value of list item's background color.
  2. over:Strong – A Hexadecimal color value of list item's background color onRollOver state.
  3. selected:Number – A Hexadecimal color value of list item's background color onSelected state.
listItemFont String Property defines list item's font. Please note that specified font is not embedded automatically. In order to prevent problems use “safe fonts” or embed fonts in your flash movie.
listItemFontColor Object Object that defines list item's font color.
  1. normal:Number – A Hexadecimal color value of list item's font color.
  2. over:Number – A Hexadecimal color value of list item's font color onRollOver state.
  3. selected:Number – A Hexadecimal color value of list item's font color onSelected state.
listItemFontSize Number Property indicates list item's font size.
loopPlayback Boolean Property indicates whether playback is looped (true).
maintainAspectRatio Boolean Property indicates whether to maintain aspect ratio when video is loaded (true).
pauseOnList Boolean Property indicates whether to pause video playback when gallery's view is switched from video to list and vice versa.
playBarBackgroundColor Object Property defines playbar background gradient color.
  1. topColor:Number – A Hexadecimal Color Value of playbar background's gradient top color.
  2. bottomColor:Number – A Hexadecimal Color Value of playbar background's gradient bottom color.
playBarColor Object Property defines playbar gradient color.
  1. topColor:Number – A Hexadecimal Color Value of playbar's gradient top color.
  2. bottomColor:Number – A Hexadecimal Color Value of playbar's gradient bottom color.
preloaderColor Number Property defines preloader gradient color.
  1. topColor:Number – A Hexadecimal Color Value of preloader's gradient top color.
  2. bottomColor:Number – A Hexadecimal Color Value of preloader's gradient bottom color.
scrollArrowColor Number Property defines scroll arrow's color.
  1. normal:Number – A Hexadecimal color value that defines scroll arrow's color.
  2. over:Number – A Hexadecimal color value that defines scroll arrow's color onRollOver state.
scrollBackgroundColor Object Property defines scroll's background color.
  1. normal:Strong – A Hexadecimal color value that defines scroll's background color.
scrollBarColor Object Property defines scroll bar's color.
  1. normal:Number – A Hexadecimal color value that defines scroll bar's color.
  2. over:Number – A Hexadecimal color value that defines scroll bar's color onRollOver state.
scrollTrackColor Object Property defines scroll track's color.
  1. normal:Number – A Hexadecimal color value that defines scroll track's color.
statusMessage Boolean Property indicates whether status message is displayed (true).
statusMessageFont String Property indicates status message font. Please note that specified font is not embedded automatically. In order to prevent problems use “safe fonts”, or embed fonts in your flash movie
statusMessageFontColor Number A Hexadecimal Color Value of the status message text.
statusMessageFontSize Number Property indicates font size.
statusMessageText Object Property defines status message text.
  1. loading:String – A String that is displayed when video is being loaded.
  2. notfound:String – A String that is displayed when video is not found.
  3. buffering:String – A String that is displayed when video is buffering.
  4. playing:String – A String that is displayed during playback.
  5. paused:String – A String that is displayed when playback is paused.
  6. stopped:String – A String that is displayed when playback is stopped.
tab Boolean Property indicates whether gallery's tabs are displayed (true).
tabColor Object Property defines tab's color.
  1. normal:Number – A Hexadecimal color value that defines tab's color.
  2. over:Number – A Hexadecimal color value that defines tab's color onRollOver state.
  3. selected:Number – A Hexadecimal color value that defines tab's color onSelected state.
tabFont String Property indicates tab's font. Please note that specified font is not embedded automatically. In order to prevent problems use “safe fonts” or embed fonts in your flash movie.
tabFontColor Number Property defines tab's font color.
  1. normal:Number – A Hexadecimal color value of tab's font color.
  2. over:Number – A Hexadecimal color value of tab's font color onRollOver state.
  3. selected:Number – A Hexadecimal color value of tab's font color onSelected state.
tabFontSize Number Property indicates tab's font size.
tabOrder String Property defines gallery's tab order.
tabTitle Object Property defines tab's title.
  1. display:String – Defines "display" tab's title.
  2. list:String – Defines "list" tab's title.
timeDisplay String Property defines format of time display.
  1. playing:String
  2. remaining:String
  3. mixed:String
totalTime Number Property defines total video length (seconds).
volume Number Property (0-100) that indicates audio volume.

Methods

Name Return Type Description
loadNext( void ) Void Loads next video specified by the content.path property.
loadPrev( void ) Void Loads previous video specified by the content.path property.
setSize( w:Number,
h:Number
)
Void Sets the width and height simultaneously. Because setting either one, individually, can cause automatic resizing, setting them simultaneously can be more efficient than setting the width and height properties individually.

If autoSize is true, this method has no effect because the player sets its own dimensions. If the maintainAspectRatio is true and the autoSize property is false, changing the width or height causes automatic resizing.

Method description by Macromedia, read more on LiveDocs
setScale( xs:Number,
ys:Number
)
Void Sets the scaleX and scaleY properties simultaneously. Because setting either one, individually, can cause automatic resizing, setting them simultaneously can be more efficient than setting the scaleX and scaleY properties, individually.

If autoSize is true, this method has no effect because the player sets its own dimensions. If the maintainAspectRatio property is true and autoSize is false, then changing scaleX or scaleY causes automatic resizing.

Method description by Macromedia, read more on LiveDocs
load( contentPath:String[,
totalTime:Number,
isLive:Boolean]
)
Void Begins loading the FLV file and provides a shortcut for setting the autoPlay property to false and setting the contentPath, totalTime, and isLive properties, if given. If the totalTime and isLive properties are undefined, they are not set. If the contentPath property is undefined, null, or an empty string, this method does nothing.

Method description by Macromedia, read more on LiveDocs
play( [contentPath:String,
totalTime:Number,
isLive:Boolean]
)
Void Plays the video stream. With no parameters, the method simply takes the FLV file from a paused or stopped state to the playing state.

If parameters are used, the method acts as a shortcut for setting the autoPlay property to true and setting the isLive, totalTime and, contentPath properties. If the totalTime and isLive properties are undefined, they are not set.

Method description by Macromedia, read more on LiveDocs
pause( void ) Void Pauses playing the video stream.

Method description by Macromedia, read more on LiveDocs
stop( void ) Void Stops the video from playing. If the autoRewind property is true, the FLV file rewinds to the beginning.

Method description by Macromedia, read more on LiveDocs
seek( time:Number ) Void Seeks to a given time in the file, specified in seconds, with a precision of three decimal places (milliseconds).

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
seekSeconds( time:Number ) Void Seeks to a given time in the file, specified in seconds, with a precision up to three decimal places (milliseconds). This method performs the same operation as the seek() method; it is provided for symmetry with the seekPercent() method.

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
seekPercent( percent:Number ) Void Seeks to a percentage of the file and places the playhead there. The percentage is a number between 0 and 100.

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
seekToNavCuePoint( time:Number ) Void Seeks to a navigation cue point that matches the specified time or is later. If time is undefined, null, or less than 0, the method starts its search at time 0.

If you specify only a time, the method seeks to a cue point that matches that time or is later.

If you specify a name, the method seeks to the first enabled cue point that matches it (for more information about enabling/disabling cue points see FLVPlayback.setFLVCuePointEnabled()).

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
seekToNextNavCuePoint( [time:Number] ) Void Seeks to next navigation cue point, based on the current value of the playheadTime property. The method skips navigation cue points that have been disabled and goes to the end of the FLV file if there is no other cue point.

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
seekToPrevNavCuePoint( [time:Number] ) Void Seeks to the previous navigation cue point, based on the current value of the playheadTime property. It goes to the beginning if there is no previous cue point. The method skips navigation cue points that have been disabled.

For several reasons, the playheadTime property might not have the expected value immediately after calling one of the seek methods or setting playheadTime to cause seeking. First, for a progressive download, you can seek only to a keyframe, so a seek takes you to the time of the first keyframe after the specified time. (When streaming, a seek always goes to the precise specified time even if the source FLV file doesn't have a keyframe there.) Second, seeking is asynchronous, so if you call a seek method or set the playheadTime property, playheadTime does not update immediately. To obtain the time after the seek is complete, listen for the seek event, which does not start until the playheadTime property has updated.

Method description by Macromedia, read more on LiveDocs
addASCuePoint( cuePoint:Object ) Void Adds an ActionScript cue point and has the same effect as adding an ActionScript cue point using the Cue Points dialog box, except that it occurs when an application executes rather than during application development.

Cue point information is wiped out when the contentPath property is set. To set cue point information for the next FLV file to be loaded, set the contentPath property first.

It is valid to add multiple ActionScript cue points with the same name and time. When you remove ActionScript cue points with the removeASCuePoint() method, all cue points with the same name and time are removed.

Method description by Macromedia, read more on LiveDocs
removeASCuePoint( CuePoint:Object ) Void Removes an ActionScript cue point from the currently loaded FLV file. Only the name and time properties are used from CuePoint parameter to find the cue point to remove.

If multiple ActionScript cue points match the search criteria, only one is removed. To remove all, call this function repeatedly in a loop with the same parameters until it returns null.

Cue point information is wiped out when the contentPath property is set, so to set cue point information for the next FLV file to be loaded, set the contentPath property first.

Method description by Macromedia, read more on LiveDocs
findCuePoint( time:Number[,
type:String]
)
Object Finds the cue point of the type specified by the type parameter and having the time, name, or combination of time and name that you specify through the parameters.

If you do not provide a value for either the time or name of the cue point, or if the time is null, undefined, or less than zero and the name is null or undefined, the method throws VideoError error 1002. For more information, see VideoError class.

The method includes disabled cue points in the search. Use the isFLVCuePointEnabled() method to determine if a cue point is disabled.

Method description by Macromedia, read more on LiveDocs
findNearestCuePoint( time:Number[,
type:String]
)
Object Finds a cue point of the specified type that matches or is earlier than the time that you specify, or that matches the name that you specify, if you specify both a time and a name and no earlier cue point matches that name. Otherwise, it returns null.

The method includes disabled cue points in the search. Use the isFLVCuePointEnabled() method to determine if a cue point is disabled.

If the time is null, undefined, or less than 0 and the name is null or undefined, the method throws a VideoError error (1002).

Method description by Macromedia, read more on LiveDocs
findNextCuePointWithName( my_cuePoint:Object ) Object Finds the next cue point in my_cuePoint.array that has the same name as my_cuePoint.name. The my_cuePoint object must be a cue point object that has been returned by the findCuePoint() method, the findNearestCuePoint() method, or a previous call to this method. This method uses the array property that these methods add to the cue point object.

The method includes disabled cue points in the search. Use the isFLVCuePointEnabled() method to determine if a cue point is disabled.

Returns null if there are no more cue points in the array with a matching name.

Method description by Macromedia, read more on LiveDocs
setFLVCuePointEnabled( void ) Void Enables or disables one or more FLV file cue points. Disabled cue points are disabled for purposes of being dispatched as events and for navigating to them with the seekToPrevNavCuePoint(), seekToNextNavCuePoint(), and seekToNavCuePoint() methods.

Cue point information is deleted when you set the contentPath property to a different FLV file, so set the contentPath property before setting cue point information for the next FLV file to be loaded.

Changes caused by this function are not reflected by calls to the isFLVCuePointEnabled() method until metadata is loaded.

Method description by Macromedia, read more on LiveDocs
isFLVCuePointEnabled( time:Number ) Boolean Returns false if the FLV file embedded cue point is disabled. You can disable cue points either by setting the cuePoints property through the Flash Video Cue Points dialog box or by calling the setFLVCuePointEnabled() method.

The return value from this function is meaningful only when the metadataLoaded property is true, the metadata property is not null, or after a metadataReceived event. When metadataLoaded is false, this function always returns true.

Method description by Macromedia, read more on LiveDocs
bringVideoPlayerToFront( index:Number ) Void Brings a video player to the front of the stack of video players. Useful for custom transitions between video players. The stack order is the same as it is for the activeVideoPlayerIndex property: 0 is on the bottom, 1 is above it, 2 is above 1, and so on.

Method description by Macromedia, read more on LiveDocs
getVideoPlayer( index:Number ) Object Gets the video player specified by index. When possible, it is best to access VideoPlayer methods and properties using FLVPlayback methods and properties. Each VideoPlayer._name property is its index.

Method description by Macromedia, read more on LiveDocs
closeVideoPlayer( index:Number ) Void Closes NetStream and deletes the video player specified by the index parameter. If the closed video player is the active or visible video player, the FLVPlayback instance sets the active and or visible video player to the default player (with index 0). You cannot close the default player, and trying to do so causes the component to throw an error.

Method description by Macromedia, read more on LiveDocs

Events

Name Return Value Description
buffering eventObject:Object Event dispatched when the FLV Gallery instance enters the buffering state. The FLV Gallery instance typically enters this immediately after a call to the play() method or when the Play control is clicked, before entering the playing state. The event object has the properties state, playheadTime. and vp, which is the index number of the video player to which the event applies.

Event description by Macromedia, read more on LiveDocs
close eventObject:Object FLV Gallery instance dispatches this event when it closes the NetConnection, by timing out or through a call to the closeVideoPlayer() method, or when you call the load() method or the play() method or set content.path and cause the RTMP connection to close as a result. The FLV Gallery instance dispatches this event only when streaming from FCS or FVSS.

Event description by Macromedia, read more on LiveDocs
complete eventObject:Object Event dispatched when playing completes because the player reached the end of the FLV file. The component does not dispatch the event if you call the stop() or pause() methods or click the corresponding controls. The event object has the properties state and playheadTime.

When the application uses progressive download, does not set the totalTime property explicitly, and downloads an FLV file that does not specify the duration in the metadata, the video player sets totalTime to an approximate total value before it dispatches this event.

The video player also dispatches the stateChange and stopped events.

Event description by Macromedia, read more on LiveDocs
cuePoint eventObject:Object Event dispatched when a cue point is reached. The event object has an info property that contains the info object received by the NetStream.onCuePoint callback for FLV file cue points. For ActionScript cue points, it contains the object that was passed into the ActionScript cue point methods or properties.

This event has a vp property, which is the index number of the video player to which this event applies.

Event description by Macromedia, read more on LiveDocs
fastForward eventObject:Object Event dispatched when the location of the playhead moves forward by seeking, either manually or through ActionScript, or by clicking the ForwardButton control. The event object has the properties state, playheadTime, and vp. The playheadTime property reflects the destination time, and the vp property is the index number of the video player to which the event applies.

This event has a vp property, which is the index number of the video player to which this event applies.

Event description by Macromedia, read more on LiveDocs
metadataReceived eventObject:Object Event dispatched the first time the FLV file metadata is reached. The event object has an info property that contains the info object received by the NetStream.onMetaData callback.

Event description by Macromedia, read more on LiveDocs
paused Triggered when player is paused.
playing eventObject:Object Event dispatched when the playing state is entered. This may not occur immediately after the play() method is called or the corresponding control is clicked; often the buffering state is entered first, and then the playing state. The event object has the state, playheadTime, and vp properties, which is the index number of the video player to which this event applies.

Event description by Macromedia, read more on LiveDocs
playheadUpdate eventObject:Object Event dispatched while the FLV file is playing at the frequency specified by the playheadUpdateInterval property. The default is .25 seconds. The component does not dispatch this event when the video player is paused or stopped unless a seek occurs. The event object has the state, playheadTime, and vp properties.

Event description by Macromedia, read more on LiveDocs
progress eventObject:Object Event dispatched at the frequency specified by the progressInterval property, starting when the load begins and ending when all bytes are loaded or there is a network error. Default is every .25 seconds.

Event description by Macromedia, read more on LiveDocs
ready eventObject:Object Event dispatched when FLV file is loaded and ready to display. It starts the first time you enter a responsive state after you load a new FLV file with the play() or load() method. It starts only once for each FLV file that is loaded.

Event description by Macromedia, read more on LiveDocs
resize eventObject:Object Triggered when player is resized.
rewind eventObject:Object Event dispatched when the location of the playhead moves backward by a call to seek() or when an automatic rewind completes.

Event description by Macromedia, read more on LiveDocs
scrubFinish eventObject:Object Event dispatched when the user stops scrubbing the FLV file with the SeekBar. Scrubbing refers to grabbing the handle of the seek bar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing stops when the user releases the handle of the SeekBar.

Event description by Macromedia, read more on LiveDocs
scrubStart eventObject:Object Event dispatched when then user begins scrubbing the FLV file with the SeekBar. Scrubbing refers to grabbing the handle of the SeekBar and dragging it in either direction to locate a particular scene in the FLV file. Scrubbing begins when the user clicks on the SeekBar handle and ends when the user releases it.

Event description by Macromedia, read more on LiveDocs
seek Triggered when location of playhead changes.
stateChanged Triggered when playback state changes.
stopped eventObject:Object Event dispatched when entering the stopped state. This happens when you call the stop() method or click the stopButton control. It also happens, in some cases, if the autoPlay property is false (the state might become paused instead) when the FLV file is loaded. The FLV Gallery instance also dispatches this event when the playhead stops at the end of the FLV file. The event object has the properties state, playheadTime, and vp, which is the index number of the video player to which the event applies.

Event description by Macromedia, read more on LiveDocs
volumeUpdate eventObject:Object Event dispatched when the volume changes either by the user moving the handle of the volumeBar control or by setting the volume property in ActionScript. The event object has a volume property.

Event description by Macromedia, read more on LiveDocs



© 2005-2007 advanced flash components