Forums / Setup & design / Detecting width and height of a Flash content object

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Detecting width and height of a Flash content object

Author Message

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#48680
http://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".