dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: keeping an aspect ratio with a 100% width

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    5
    I want a flash movie whose width is 100% of the browser window, and whose height is set initially and on a resize by a javascript to be .75 * the pixel value of it's width (or the pixel value of the browser's inner width.) This would allow the same size ratio to be kept all the time at full browser at any resolution. I can't figure out how to do it. There's a window.innerWidth property I could use, but it's not supported by ie. Is there any other way to do this?

  2. #2
    Instead of using a javascript, you may be able to just set the publish settings of the movie itself. I like the movie to match whatever the size of the browser/screen/resolution is. So, I go to publish settings, the html tab, dimensions=100%, scales=default (show all). This will keep the aspect ration exactly as you have the movie setup, but bring your width to match the size of the browser window.

    I hope this is helpful

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Posts
    5
    Thanks for replying, but I don't want to deal with the borders added by that method. See, if you could keep the height dynamically adjusted to a value proportional to the pixel value of the width when the width is set to be 100% of the browser window, then at any resolution or window size the movie would stretch from side to side and maintain the same ratio, but there would be no borders involved.

  4. #4
    Oh, well in that case just download the "gutterless" template. That eliminates the border problem altogether. If you can't find it somewhere (I forget where I got mine) let me know and I'll email it to you.

    c-sharp@mediaone.net

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center