Description
Creates an embedded ActiveX control in the projector.
available: SWFKit and SWFKit Pro
Syntax
createControl(progid, left, top, right, bottom[, param[, licensekey]])
Parameters
Returns
An object contains two properties
Remarks
If the method creates a windowless control, the window property of the returned object will be undefined. The Windows Media Player control will always be windowless activated, if you want to close it, you cannot use the close method of the window object but should do in this way
//Embed a Microsoft Media Player in the projector:
var mplayer = createControl(
"MediaPlayer.MediaPlayer.1", 0, 0, 200, 200);
...
//destroy it
delete mplayer;
mplayer = null;
SWFKit doesn't support windowless activating for any other controls. It doesn't draw it, so you will get nothing in the main window if you create a control activated in windowless mode.
//Activate a Flash Player in windowless mode.
//For SWFKit doesn't draw the windowless control
//The control won't be visible in the main window
//`fp.window' returns undefined
var fp = createControl(`ShockwaveFlash.ShockwaveFlash',
0, 0, 320, 240,
`wmode=transparent&movie=c:\\test.swf&bgcolor=0xFF0000');
fp.activex.play();
trace(fp.window.handle);
Example
//Embed a Microsoft Media Player:
var mplayer = createControl(
"MediaPlayer.MediaPlayer.1", 0, 0, 200, 200);
//Open an avi file
mplayer.activex.Open("c:\\demo.avi");
//Embed a Microsoft Media Player:
var mplayer = createControl("MediaPlayer.MediaPlayer.1",
0, 0, 200, 200, "filename=c:\\demo.avi");
//Embed a Flash Player:
var fp = createControl(`ShockwaveFlash.ShockwaveFlash',
0, 0, 320, 240,
`wmode=window&movie=c:\\test.swf&bgcolor=0xFF0000');
fp.activex.play();
trace(fp.window.handle);