Forums / Setup & design / Detecting width and height of a Flash content object
Knut Urdalen
Wednesday 12 December 2007 1:14:02 am
I just used a few hours debugging why a recent published Flash content object didn't show up. It turned out that it was because the width and height attributes was set to zero!
Why is that? I normally use getimagesize() (http://no.php.net/manual/en/function.getimagesize.php) to detect width and height of swf-files, and I've never seen problems with it. I didn't know where to start debugging it in the Exponential libraries so I'm asking you guys. There's some information about detecting width and height of swf-files in the PHP manual comments: http://no.php.net/manual/en/function.getimagesize.php#55503 http://no.php.net/manual/en/function.getimagesize.php#48680http://no.php.net/manual/en/function.getimagesize.php#44640
Setting the width and height to zero indirectly is bad, even if Exponential is not able to detect it. Editors will expect that their created content will show up. If Exponential is not able to detect the size when uploading I think it should display a warning: "Exponential was unable to detect the size of this media content, please define a width and height explicitly".