resizing flash swf with javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colinod
    Contributor
    • Nov 2007
    • 347

    resizing flash swf with javascript

    I have an mp3 player built in flash with vaious paramaters that set colour and size file played etc, i want to be able to set the height and width depending on the screen resolution but cant figure out how to do this.

    the embed code is as follows

    Code:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="131" height="16" id="FlashID2">
                  <param name="movie" value="../images/flash/player_mp3.swf" />
                  <param name="quality" value="high" />
                  <param name="wmode" value="opaque" />
                  <param name="swfversion" value="7.0.70.0" />
                  <param name="bgcolor" value="#000000" />
                  <param name="FlashVars" value="mp3=test.mp3&amp;showvolume=0&amp;showslider=1&amp;showstop=0&amp;width=104&amp;height=13&amp;bgcolor1=0066cc&amp;bgcolor2=000000&amp;buttonovercolor=ffff66" />
                  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                  <param name="expressinstall" value="../scripts/expressInstall.swf" />
                  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                  <!--[if !IE]>-->
                  <object type="application/x-shockwave-flash" data="../images/flash/player_mp3.swf" width="131" height="16">
                    <!--<![endif]-->
                    <param name="quality" value="high" />
                    <param name="wmode" value="opaque" />
                    <param name="swfversion" value="7.0.70.0" />
                    <param name="expressinstall" value="../scripts/expressInstall.swf" />
                    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                    <div>
                      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                      </div>
                    <!--[if !IE]>-->
                    </object>
                  <!--<![endif]-->
                  </object>
    I have tied putting this in a div and setting height and width to 100% and then setting my div with css to size but the player dissapears.

    I have attached zip file with player in it

    can anyone give me any pointers

    thanks
    Attached Files
Working...