Home > Products > Moyea Web Player Premium > Tutorial

Product List

Upgrade

Click to Get
Advanced Editions

Software Testing

Please download Test resources to test & compare Moyea SWF To Video Converters with other SWF converters!

A graphical program for customizing flash video player for website
Price: $99.95

How to change flash player settings from HTML fileTutorial

From Moyea Web Player Pro version, besides SWF web player, there would be also an html file generated, from which the detail parameters for the web player are changeable. This html file not only can be controllable by the desktop program, but also supported to change directly from its code. This tutorial is to show you how to change the web player parameters without using the desktop program.

To change the web player parameters without using the desktop of Moyea Web Player,what you need to do is to embed this SWF file into a HTML page layout, and then transfer a character string named playerOpts from the SWF file path so as to make the character string named playerOpts control the action of the control bar. You can code the page layout like the following:

<embed src="mwplayer.swf?playerOpts=previewBar*black.swf*s" quality=high pluginspage= "https://www.macromedia.com/shockwave/download
/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="500" height="450">
</embed>

Do you notice the mwplayer.swf in blue? It is one of those flash video web players.
The width="500" height="450" in red indicates the width and the height of your video.

The playerOpts=previewBar*black.swf*s in red indicates the name of the FLV file to be played while demo.flv is your video. You might be curious about targetClip, the asterisk separator and the "s" in the end.

n fact, playerOpts is not that simple. PlayerOpts consists of several segments, each of which is separated by "||", and each segment contains a property of the control bar. One segment is divided into 3 parts by the asterisk (*). The first part is the property name, the second part is the property value and the third part is the data type of the property. For instance, previewBar*black.swf*s is a segment, previewBar is the property value, black.swf is the property name and the "s" is the character string type of this property. This segment is to specify the path from which the control bar can play the video. There are also other properties. You can set multiple properties at a time, using "||" to separate different segments, code like the following :

playerOpts=previewBar*black.swf*s||panelColor*255,0,0*c

In this way, when you are setting the previewBar properties, you are also setting the panelColor properties. The panelColor is the control bar color, the data type is color "c", and 255,0,0 is the RGB color. Please notice that the property name and data type are case sensitive.

The table below shows the changeable properties and their functions:

Property Data type Description
previewBar

Character string: "s"

Specify related flash video list templates.

showPlayer

Boolean type: "b"

Set to show control bar or not. Default value is true.

playerAlign

Character string: "s"

Set the position for the control bar; top is on the top, bottom (default) is at the bottom.

playerOverMovie

Boolean type: "b"

Set the control bar to be shown over the movie or not. Default value is false.

playerAutoHide

Boolean type: "b"

Set the control bar to hide automatically or not. Default value is false.

hideDelay

Integer type: "i"

Delay to hide control bar in certain milliseconds, e.g. hideDelay*1000*i
it indicates to hide the control bar if the mouse isn't moved in 1 second.

panelColor

Color type: "c"

Set the control bar color, e.g.:
panelColor*255,0,0*c
it indicates to set the control bar color to be red;
255,0,0 is for the color components R, G, B.

Some control bars do not include this property. Thus even if you set this property, the effect won't be shown on such control bars.

sndMute

Boolean type: "b"

Set the control bar to be mute or not. Default value is false.

sndVolume

Integer type: "i"

Set the percentage of the volume on the control bar when video starts to play. Possible values range from 0 to 100. Default value is 100.

noMuteBtn

Boolean type: "b"

Set to hide the mute button or not.

noStopBtn

Boolean type: "b"

Set to hide the stop button or not.

noFullScreenBtn

Boolean type: "b"

Whether it hides full screen button or not.

noPlayListBtn

Boolean type: "b"

Whether it hides playlist operation button or not.

noWatchBtn

Boolean type: "b"

Whether it hides related flash video list button or not.

noProcBar

Boolean type: "b"

Set to hide the process bar or not.

noVolumeBar

Boolean type: "b"

Set to hide the volume adjustment or not.

noTimeText

Boolean type: "b"

Set to hide the text about the video time or not, the form is time played / total time.

pauseAtFirstFrame

Boolean type: "b"

Specify whether the playing of the video pauses at the first frame, when it starts to play. True (default) indicates to pause at the first frame, while false indicates to play automatically.

pauseAtLastFrame

Boolean type: "b"

Specify whether the playing of the video pauses at the last frame, when it plays to the end. True indicates to pause, while false (default) indicates to return to the first frame.

showReplay

Boolean type: "b"

Set to show the Replay button or not. Default value is false.

textReplay

Character string: "s"

Set the character for the Replay button. Default value is "Replay".

bigPlay

Character string: "s"

Set the URL of the SWF file to display a big play button when the playing is paused or stopped.

playBtnAlign

Character string: "s"

The Alignment of the big play button, possible values are:

top-left, top-center, top-right, left-center, center, right-center, bottom-left, bottom-center, bottom-right

playBtnAlignX

Integer type: "i"

Set the x ordinate of the big play button; playBtnAlign is the origin.

playBtnAlignY

Integer type: "i"

Set the y ordinate of the big play button; playBtnAlign is the origin.

playBtnW

Integer type: "i"

Set the width of the big play button.

playBtnH

Integer type: "i"

Set the height of the big play button.

preLoader

Character string: "s"

Specify the URL of the SWF file for preloader to load the entire video before playing.

autoLoad

Boolean type: "b"

Set to automatically load the movie or not.
When autoLoad is true, the SWF file, as a player, will automatically load the FLV file.
When autoLoad is false, the FLV file will be loaded after the play button is clicked.
Default value is false.

Note: When video is embedded to SWF file, the movie will be loaded automatically whatever the value is.

unloadOnStop

Boolean type: "b"

Set to unload video when the playing is stopped or not.

When unloadOnStop is true, the video will be unloaded, if the stop button is clicked. If the video data is not completely downloaded, the downloaded data of the video will be eliminated from the player and the thumbnail will be shown if thumbnail is chosen, or black screen will be shown.

When unloadOnStop is false, the first frame of the video will be shown and the video downloaded won't be unloaded, if the stop button is clicked. If the video is not completely downloaded, the remaining data of the video will be downloaded.

bufferTime

Floating-point type: "f"

Set the buffer time for the control bar; if you set 1.5, the player will buffer the data to play 1.5 seconds before playing. Default value is 5.0.

autoHideMouse

Boolean type: "b"

Set to automatically hide the mouse cursor or not.

autoRewind

Boolean type: "b"

Set to automatically rewind the video or not. Default value is false.

minWidth

Integer type: "i"

The minimum width permitted. When the width of the player is less than the minimum width, the two vertical sides of the video will be cut off, instead of being stretched to match the width of the player.

Default value is 0, i.e. the width of the video will be consistent with the width of the player.

minHeight

Integer type: "i"

The minimum height permitted. When the height of the player is less than the minimum height, the two horizontal sides of the video will be cut off, instead of being stretched to match the width of the player.

Default value is 0, i.e. the height of the video will be consistent with the height of the player.

thumbNail

Character string: "s"

Specify the video thumbnail, which will be loaded before the video is played.

keepAspect

Boolean type: "b"

Set to keep aspect ratio of the video or not when the video is stretched. Default value is false.

playerExt

Character string: "s"

Set the URL of the SWF file, which is a player extension. When the video is loading, the swf specified by playerExt will be loaded by the player, and the swf file will implement the extension function.

movieID

Character string: "s"

Set an ID for the video, which will be passed to onPlayURL.

onPlayURL

Character string: "s"

The URL to be accessed when the video starts to play.

A parameter named movieID will be passed to this URL.

Note: No browser window will pop up when this URL is accessed.

fscEvent

Boolean type: "b"

Set to transfer the player event to fscommand or not.

When the value is true, the player event will be transferred to fscommand(t, n); t is the event type. When using the player provided by Flash Video MX, t is MoyeaPlayer persistently; n is event name.

playListPath

Character string: "s"

Specify to play playlist file.

playItem

Integer type: "i"

Directly specify to play which item in playlist.


Besides setting the properties of the flash video Web Player above, if you know Action Scripts, you can also apply Control bar API to set these control bars to listen to some events, such as event to play or stop, and event when user clicks the pause button. You can refer to the Control bar API.

Price: $99.95

Moyea Web Player Premium
Web Player Premium - Powerful Flash on Zune Player Solution!

You May Also Be Interested in These Items

Moyea SWF to Video Converter Std
Total Flash SWF to Video Converter Solution for common users! Learn More...
Price: $69.95

Moyea SWF to Video Converter Pro
The best & the only SWF Converter solution for professionals! Learn More...
Price: $99.95