Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Flash Files - Width/Height Auto-detection
Old 10-16-2005, 01:57 AM Flash Files - Width/Height Auto-detection
Yegorpb's Avatar
Extreme Talker

Posts: 182
Trades: 0
Here is my problem. As you know, flash files don't behave the same what when you ignore width/height parameters as images. Images simply show their true dimensions, while flash files show.... god knows what.

Im building up a flash game database, and each one has different dimensions. Im using a custom script to manage my database, and the dimensions were hard-coded into the page that displays the flash file, like so:

Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="600" height="400" align="center">
      <PARAM NAME=movie VALUE="http://www.omfgmedia.com/games/<? echo $filename; ?>">
      <PARAM NAME=quality VALUE=high>
      <EMBED src="http://www.omfgmedia.com/games/<? echo $filename; ?>" width="600" height="400" quality=high TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> </EMBED>
    </OBJECT>
This raises problems, since not all flash files are that size, or have that width to height ratio, so some games have horizontal or vertical bars which shouldn't be there. I could code width/height variables into each database entry for the game, but that would mean I would have to measure each game to find its true dimensions, which is a very painstaking process.

Is there a way to have javascript auto-detect the true width/height and substitute the width/height variables with proper values so the game displays properly?
__________________

Please login or register to view this content. Registration is FREE
- Things to do when you are bored. [
Please login or register to view this content. Registration is FREE
]

Please login or register to view this content. Registration is FREE
- Talk about anything and everything

Please login or register to view this content. Registration is FREE
- Buy an iPod and smash it in the store!
Yegorpb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-04-2006, 04:43 PM Re: Flash Files - Width/Height Auto-detection
Junior Talker

Posts: 1
Trades: 0
I have developed some code that detects the width and height of an SWF file, but it requires ASP.net to open the file and read bytes.

http://www.pixelengineering.com/site..._id=HKPDMAGFKG

Last edited by MyDarkEmbryo; 10-04-2006 at 04:55 PM.. Reason: bad link
MyDarkEmbryo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Flash Files - Width/Height Auto-detection
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25165 seconds with 12 queries