magnetica Posted February 25, 2007 Share Posted February 25, 2007 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 More sharing options...
magnetica Posted February 25, 2007 Author Share Posted February 25, 2007 Come on guys, don't let this topic get shoved down the bottom I have looked everywhere on the net and nothing Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193869 Share on other sites More sharing options...
Yesideez Posted February 25, 2007 Share Posted February 25, 2007 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. Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193873 Share on other sites More sharing options...
magnetica Posted February 25, 2007 Author Share Posted February 25, 2007 Ok. But if I was to do that it would take me days as I have over 300 games But thanks. I think I will just make the default dimensions bigger so that it can never be too small Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193876 Share on other sites More sharing options...
Yesideez Posted February 25, 2007 Share Posted February 25, 2007 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. Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193885 Share on other sites More sharing options...
magnetica Posted February 25, 2007 Author Share Posted February 25, 2007 Yea I know about the images that go off screen and are still visible. I've set the default dimensions to 425 by 425. I'll just add a report error link so that if users are annoyed or not happy can e-mail me Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193889 Share on other sites More sharing options...
Yesideez Posted February 25, 2007 Share Posted February 25, 2007 Might be an idea to make a new email if you post your email address on the site as bots trawl sites looking for emails and using them to spam rubbish. Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193892 Share on other sites More sharing options...
magnetica Posted February 25, 2007 Author Share Posted February 25, 2007 Yea will do that anyway And i can just block these bots out. Link to comment https://forums.phpfreaks.com/topic/40079-php-and-flash-dimensions/#findComment-193895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.