i believe you can just do:

var myswf = document.getElementById("myContent");
var width = myswf.width;
var height = myswf.height;

this should return the size of the element as calculated by the DOM (can
only return the size of the swf AFTER your swf has been embedded by
SWFObject; otherwise will return the size of the element before embedding
has occurred).

if you want to avoid the DOM and get the SWF to tell you what size it is,
you can try using built-in methods like *TGetProperty:

*myswf.TGetProperty("/", 8); //width
myswf.TGetProperty("/", 9); //height
*
*i don't know if TGetProperty is still supported in AS3.

- philip


*
*On Thu, Aug 20, 2009 at 4:15 AM, 江湖 <[email protected]> wrote:

>
> <script src="swfobject.js"></script>
> <script type="text/javascript">
> swfobject.embedSWF("01.swf", "myContent", "300", "120", "9.0.0",
> "expressInstall.swf");
> <div id="myContent">
>
> </div>
>
> i embed a flash file use dynamic method of swfobject
>
> now  i  want to get the real height and width of a flash object and
> adjust it
>
> does some api support this ?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to