SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    kansas
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Screen resolution/resizing script

    Hello,

    The below code works to resize the swf based on the screen resolution, but it is not working in mozilla, opera, and netscape. Why is this?
    Code:
    <script language="javascript">
    				v1="<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'";
    v3="><PARAM NAME=movie VALUE='../images/header.swf'><PARAM NAME=wmode VALUE='transparent'><PARAM NAME=loop VALUE='false'><PARAM NAME=play VALUE='true'><PARAM NAME=quality VALUE='best'></OBJECT>";
    if (screen.width==800){
    v2="WIDTH=733 HEIGHT=160";
    }
    if (screen.width==1024){
    v2="WIDTH=951 HEIGHT=210";
    }
    if (screen.width==1280){
    v2="WIDTH=951 HEIGHT=210";
    }
    if (screen.width==1600){
    v2="WIDTH=951 HEIGHT=210";
    }
    document.write(v1+v2+v3);
    </script>
    Last edited by rmv17; Feb 19, 2005 at 10:40.


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
  •