SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast edgarzakaryan's Avatar
    Join Date
    Aug 2012
    Location
    Yerevan, Armenia
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detect size of swf file

    I'm using this code to embed swf to website, but height and wight should be detected automatically.

    Code:
    <OBJECT ID="aa" 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="450" align="center">
    <PARAM NAME=movie VALUE="MYFLASHFILE">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED src="MYFLASHFILE" width="600" height="450" quality=high TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> </EMBED>
    </OBJECT>
    as you may see here width="600" and height="450", but it should be done automaticly.

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    As far as I know there is no way to find the height and width of a SWF file using JavaScript, however you can find the values using PHP and the getimagesize() function.

  3. #3
    SitePoint Enthusiast edgarzakaryan's Avatar
    Join Date
    Aug 2012
    Location
    Yerevan, Armenia
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chris.upjohn View Post
    As far as I know there is no way to find the height and width of a SWF file using JavaScript, however you can find the values using PHP and the getimagesize() function.
    Thanks, it's worked, I didn't know that I can get size of swf using getimagesize() function .

  4. #4
    SitePoint Zealot imouto's Avatar
    Join Date
    Sep 2004
    Location
    Gotham
    Posts
    184
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I know this is a somewhat old thread, but I was looking for the same thing and just found this possible solution using JavaScript and the TGetProperty Flash method:

    http://blog.codefidelity.com/?p=14

    Just posting it here in case it's helpful for others.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •