|
|||
|
Hi,
I'm using the following code... Code:
var img = Image.captureMovie(0,0,600,425); However, if I re-size the Windows window and the Flash movie's size is scaled (I'm using the 'Show All' scaling mode) then the above code only captures, say, a corner of the movie if the movie's size has been increased. How do I find the new pixel dimensions and position (Show all can result in white bars above and below and to the sides of the movie) of the scaled movie? Cheers, I. |
|
|||
|
I don't want the entire movie.
I have a swf loaded into a movie clip in the main movie and this inner swf is smaller than the main movie. But I only want to capture the inner swf so I need to specify the dimensions. But when I read out the dimensions of the inner swf (or the movie clip that contains it) they're always the same regardless of how the application window has been re-sized. |
|
|||
|
You need to call the FlashPlayer.movieToWindow method to translate the dimensions of the movie from movie coordinates system to the windows client coordinates system.
1. In action script get the bounds of the movie Code:
pos = mymovie.getBounds(); Code:
var mleft = parseInt(FlashPlayer.getVariable("_root.pos.xMin"));
var mtop = parseInt(FlashPlayer.getVariable("_root.pos.yMin"));
var mright = parseInt(FlashPlayer.getVariable("_root.pos.xMax"));
var mbottom = parseInt(FlashPlayer.getVariable("_root.pos.yMax"));
var rect = FlashPlayer.movieToWindow(mleft, mright, mtop, mbottom);
Image.captureMovie(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|