mdm.MediaPlayer() This page was last modified over 30 day(s) ago and has 0 comment(s)


Back to MediaPlayer Class Summary

Availability
Windows

Constructor
mdm.MediaPlayer(x:String, y:String, width:String, height:String, uiMode:String, contextMenu:Boolean, stretch:Boolean, file:String):Void

Parameters
x:String - X position (relative or absolute)
y:String - Y position (relative or absolute)
width:String - Width of instance (relative or absolute)
height:String - Height of instance (relative or absolute)
uiMode:String - User Interface Mode
contextMenu:Boolean - Show/hide context menu
stretch:Boolean - Stretch media file to instance dimensions
file:String - Initial media file to load

Returns
instance of newly created MediaPlayer object

Description
Inserts a Windows Media Player instance using the specified parameters. Multiple instances can be created. Constructor uses string based arguments for x/y and width/height as that is possible to use relative positioning and dimensions to use in newly created instance (see below).

Notes
Windows Media Player 9 or later must be installed on the users system for this command to function correctly.
Valid values for 'uiMode' are:
invisible - The player is not visible
none - The player does not show a control bar
mini - The player shows a mini control br
full - The player shows a full control bar

For transparent projectors closing your application with key combinations (e.g. Ctrl+F4) will only work if the Flash content is in focus.

String constants for positioning are:
"L" - left
"C" - center
"R" - right
"T" - top
"B" - bottom

The value for dimension if relative needs to be percentage of available application window, e.g. "50%", "10%", etc

The MediaPlayer Class is not available when Direct Wmode (Stage Video) is Enabled.

Example Code
//Creates a new instance with absolute positioning:
var myMP = new mdm.MediaPlayer(new String(0), new String(0), new String(400), new String(350), "none", false, true, "C:\\myFile.wmv");

//Creates a new instance with relative positioning:
var myMP = new mdm.MediaPlayer("C", "C", "50%", "50%", "none", false, true, "C:\\myFile.wmv");

mdm.MediaPlayer Class Example Downloads
No Example Downloads Available


Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page