|
-
Can PHP rip apart a swf to find out its native Height and width. I'm not having any luck with my other post so I thought I'd try something new.
-
You want to get the size of a Flash movie from a php script !?!
What that is for !??
I am interesting to find a way but try to explain better, please!
-
height and width
We're building a method of serving swf ads in our Flash game. The advertisers can send an ad of whatever dimensions. So instead of asking the creative to include the height and width of the ad I want to be able to find out on the backend. Using the _height and _width properties ,within Flash, include anything that might be off the stage. So, a movie that is 600 x 300 might give height and width properties of 1000 x 494 or even 3 x 5 if the first frame is only a couple of graphics. Once we have the size of the ad we could then resize it to fit our window, no matter what the dimensions might be. I hope that clarifies.
-
Hi flewitt,
I am more of a perl person, and in perl you can read a binary string in a buffer and unpack() it. I m not sure what the php equivalent is.
You want to process a swf header, which is
characters FWS, followed by binary version number (4 bytes together)
size of swf in bytes (4 bytes)
a rectangle: 5 bits giving size of following fields in bits
values for xmin, xmax, ymin, ymax using the number of bits mentioned before. The values are in twips (maximum 257 bits or 33 bytes for the rect.)
@idoia: while the absolute size might be somewhat meaningless, at least the x/y ratio could be quite helpful if you are embedding swf movies into dynamic html pages, the same way you might want to figure out sizes of gif and jpeg pictures you are including in dynamic pages.
Musicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|