I'm trying to find the stage height and width of .swf's and pass it to a movie with xml.

I found these two relevant posts on how to grab the height and width of a gif and the theory behind doing it for a swf:
http://board.flashkit.com/board/show...hreadid=285002
http://board.flashkit.com/board/show...hreadid=122862

I'm a perl novice. Can someone post an example script that would parse the correct header? Also, in the second example, it states that the xmax and ymax would be returned. But that's not the stage size. Is there a way to get the stage size?