How to get the size of a dynamically loaded swf using javascript?

I want to get the dimensions of a dynamically loaded Flash object and resize the DIV accordingly. I cannot use a server-side language for this.

I tried to search for loading and reading the header part of a SWF file to get its dimensions using javascript, but came out empty.

Is it possible / possible?

Thanks in advance, J

+2
javascript html css flash


source to share


1 answer


As pointed out in the discussion here , you need to create another swf (call it A) that loads the swf you want to inline (call it B) and read the dimension B using A Loader

contentLoaderInfo

to get to width

and height

from B. Finally, pass the JS value via a ExternalInterface

.



+2


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics