View Full Version : Original Stage size for a loaded MC?
astgtciv
01-13-2006, 03:01 AM
Is there a way to get the original Stage size for a dynamically loaded MovieClip? What I mean is: the _width and _height for a loaded MovieClip do not have to be equal to its original Stage size (e.g., the Stage size at which it was exported from Studio) - for several reasons, such as having off-Stage content (e.g., "dummy" textFields for font embedding), or simply that mc could load into itself some other mc that was larger than it (and would get cropped if we were viewing the "original" mc). I know that size is stored somewhere in the swf, because viewing the swf alone in flash certainly does set the viewing area size to the original Stage size...
thanx!
astgtciv
01-13-2006, 04:05 AM
E.g., here (http://www.sephiroth.it/reference.php?id=503&cat=1) it says:
The loaded movie clip does not inherit the main movie clip's Stage size.
But how to get that Stage size for the loaded movie clip?
astgtciv
01-13-2006, 04:20 AM
I am going to take this (http://chattyfig.figleaf.com/pipermail/flashcoders/2005-August/147269.html) as my answer, then:
once loaded, a swf (movie clip) is only ever as wide as whats inside of it. It doesnt have any intrinsic width or height. or in other words: you
cant access the header information of a swf file from within the player.
-- Martin Wood
astgtciv
02-28-2006, 11:34 PM
In fact, it is possible using PHP, the answer by Flash Gordon/code by Pleh here: http://actionscript.org/forums/showthread.php3?t=94028&page=2 .
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.