# Dynamically loaded SWFs - dimensions?

**URL:** <https://www.ruby-forum.com/t/dynamically-loaded-swfs-dimensions/127249>\
**Category:** Rails\
**Created:** [January 27, 2008, 1:47am UTC](https://www.ruby-forum.com/t/dynamically-loaded-swfs-dimensions/127249 "2008-01-27T01:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@cbnewman](https://www.ruby-forum.com/u/cbnewman)\
**Post date:** [January 27, 2008, 1:47am UTC](https://www.ruby-forum.com/t/dynamically-loaded-swfs-dimensions/127249/1 "2008-01-27T01:47:50Z")

</div>

Anyone know a way to get the dimensions of a SWF using ruby on rails.  
Similar php’s getImageSize() function that can read swf files.

i know about this for images; jpg, gif, png:  
[http://snippets.dzone.com/posts/show/805](http://snippets.dzone.com/posts/show/805) from  
[How to get image properties - Rails - Ruby-Forum](http://www.ruby-forum.com/topic/64679)

I need a solution for dynamically loaded SWF flash files that my users  
will be uploading; without making them enter the dimensions for every  
swf file. any sort of solution, such as a javascript one would be  
great…

Anyone? help!!!

---

<div class="post-metadata">

**Author:** ![cbnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@cbnewman](https://www.ruby-forum.com/u/cbnewman)\
**Post date:** [February 11, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/dynamically-loaded-swfs-dimensions/127249/2 "2008-02-11T18:33:27Z")

</div>

[http://code.google.com/p/ruby-imagespec/source/checkout](http://code.google.com/p/ruby-imagespec/source/checkout)

a coworker of mine made this. its the only straightforward solution for  
reading swfs issue that i’ve found.
