Auto Sizing SWF files

Discussion in 'PHP' started by GotSkillz, May 25, 2008.

  1. #1
    Hi, I have an arcade site, and you have to manually put in the height and width of each game, which typically is a swf file. Do you know of any common methods in php that can be used to auto-size these games? I am using avarcade script.

    If i'm in the wrong place please forgive me, as most of the script is written in php.

    Thanks,
    Skillz
     
    GotSkillz, May 25, 2008 IP
  2. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    FFMPEG-PHP *MIGHT* be able to do this, but you'll need a dedicated server.

    Or just pull the width and height from the database and:

    
    <object width="'.$width.'" height="'.$height.'">
    <param name="movie" value="'.$file.'">
    <embed src="'.$file.'" width="'.$width.'" height="'.$height.'">
    </embed>
    </object>
    
    Code (markup):
     
    itnashvilleCOM, May 25, 2008 IP
  3. ankit_gupta

    ankit_gupta Peon

    Messages:
    666
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can also make it like width=100% height=100% as default :)
     
    ankit_gupta, May 25, 2008 IP
  4. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #4
    however if your allowing members to link to a swf file make sure that you filter it so that they can not insert the height and width for insert
     
    lowridertj, May 26, 2008 IP
  5. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yeah but some might upload files larger than your web design, that's the only problem with that unfortunately.
     
    itnashvilleCOM, May 27, 2008 IP
  6. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #6
    please read my above statement.
     
    lowridertj, May 27, 2008 IP