Description
Converts a rectangle from the movie coordinates system to the windows client coordinates system
Syntax
FlashPlayer.movieToWindow(left, right, top, bottom)
Parameters
Returns
An object with the properties left, top, right, and bottom
Example
The example shows how to place an ActiveX control onto a MovieClip.
//Providing the name of the MovieClip is
"mymovie".
//Get the placement of the MovieClip
//in the Action Script:
var pos = mymovie.getBounds();
//Then converts the placement to
//the windows client coordinates
//system in the FFish Script:
FlashPlayer.bindData("pos.xMin", "pos.yMin",
"pos.xMax", "pos.yMax");
FlashPlayer.updateData(true);
var rect = FlashPlayer.movieToWindow(
FlashPlayer.pos.xMin,
FlashPlayer.pos.xMax,
FlashPlayer.pos.yMin,
FlashPlayer.pos.yMax);
var mp = createControl("MediaPlayer.MediaPlayer.1");
mp.window.left = rect.left;
mp.window.top = rect.top;
mp.window.width = rect.right - rect.left;
mp.window.height = rect.bottom - rect.top;