mApplication.createMediaWindow()

Availability

Windows: Flash 8 or 9 AS2.0 swf + mProjector 3.0

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 2.0.6;

Usage

mApplication.createMediaWindow(fileName:String, x:Number, y:Number, width:Number, height:Number, parameter:String, title:String) : Object

Parameters

fileName - Path to the file used to initialize the window. The file type and path can be any supported by the end-user's Safari browser -- i.e html, pdf, quicktime, etc. The filepath can be a local filepath or a URL.

x - Window x position.

y - Window y position.

width - Window width.

height - Window height.

parameter - Context parameter. Use this parameter to store coded information about the window. For example if the window represents an IM chat, this param could contain the userid of the chat.

title - Window title.

Returns

An object.; ; Returns a window object.

Description

Method; Creates a new window displaying browser content such as html, pdf, or QuickTime files. The content can be anything the end-user's Safari browser can open.

The window created will be a standard resizeable, rectangular type window

The returned window object has the same methods as the main mWindow object although the Flash-related methods are not relevant. The context parameter passed to this function can be retrieved by the created window's ActionScript using the mWindow.getParameter() function.

Valid mWindow methods and events for embedded windows:
mWindow.close()
mWindow.getParameter()
mWindow.getPosition()
mWindow.getSize()
mWindow.loadMedia()
mWindow.setPosition()
mWindow.setSize()
mWindow.show()
mWindow.setAlpha()
mWindow.bringToForeground()
mWindow.onActivate()
mWindow.onClose()
mWindow.onMinimized()
mWindow.onRestored()

Example

The following example creates a window displaying online documentation of this command.

var mediaWindow = mApplication.createMediaWindow("http://www.screentime.com/software/mprojector/docs/mApp_createMediaWindow.htm",100,100,200, 200, "docs", "Online Documentation");
if (mediaWindow)
{
   mediaWindow.setZOrder("TOP");
}

See Also

mApplication.createWindow(), mWindow.embedMediaWindow(), mWindow.getParameter(), mWindow.loadMedia()

Code Examples

Embedding HTML and other Media types