[thelist] Get the dimensions of a Flash file using JavaScript...

John Dowdell jdowdell at macromedia.com
Thu Jun 20 16:15:01 CDT 2002


At 12:47 PM 6/20/2, Chris George wrote:
> I need to get the dimensions of a Flash file
> in a web page using JavaScript.

This can be hard. The first question to answer is "Which JavaScript?"
Different browsers have different implementations. Your visitors can choose
their browser, so finding what they're using is the first step in learning
whether JavaScript can tell you this.

I don't know why your JavaScripts need to know this, so it's hard to offer
an alternate path, but when you're creating your OBJECT and EMBED tags
you'll have the display dimensions offered to you, so it might be possible
to hardwire this as a variable declaration in your page's JavaScript. (This
would avoid having the browsers ask things of objects in the page.)

jd




John Dowdell, Macromedia Developer Support, San Francisco
(Best to reply on-list, to avoid my mighty spam filters!)
Technotes: http://www.macromedia.com/support/search/
Column: http://www.macromedia.com/desdev/jd_forum/
Technical daily diary: http://jdmx.blogspot.com/





More information about the thelist mailing list