Jump to content

PHP and Flash Dimensions


magnetica

Recommended Posts

Well pretty obvious from the topic title.

 

I am using PHP and I display a flash game/movie, but at the moment I have to set the dimensions

of the flash oject to a default value e.g. 400px by 350px.

 

I wish to dynamically get the dimensions of the flash game/movie and set that as the dimensions

of the flash object

 

For example if I have a flash game/movie called flashgame.swf stored in games/flashgame.swf

From PHP I want the grab the dimensions

 

Sorry if I havn't made any sense at all. Let me know if I havn't.

 

I am not sure but can the Super Global Array $_FILES do this?

 

If not anyone get any ideas or tutorials you may think will help

 

Thanks in Advance. Sean

Link to comment
https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/
Share on other sites

Have you got a database running?

 

If you have, place all the dimensions of the flash files in there and reference the relevant table when the user selects a flash file or if the flash files are being pulled regularly, write a function to reference the relevant table and "make" the html for you.

 

I don't think you can actually pull the dimensions of a flash file from it but I might be wrong.

Beware of some (probably quite a few) flash games that if you don't get the aspect ratio of the width and height correct then some images used in the files will become visible off the edges.

 

As for how long it takes, depends on how much time you want to put into it.

 

A quick way I've used is open the flash file into a browser from my PC, resize the browser until the flash file looks right then performed a PrintScreen, pasted the file into Photoshop, selected the flash area and copied and pasted into a new file to get the dimensions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.