A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [HTML] embedding SWF so it stretches to screen size, but to a limit

  1. #1
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746

    [HTML] embedding SWF so it stretches to screen size, but to a limit

    I have wanted to do this for a long time, but never found a solution, so now I'm breaking down and asking.

    Sometimes I create a Flash document which is set up so the document can stretch(noScale, align, onResize to size/position elements of the site, ect.), then in the HTML I set the width/height to 100%, so the Flash doc stretches to match screen size(for the sake of stretching a background, usually, or placing an object always near an edge of the screen). This all works very good, but there is one thing I'd like to adjust. Here's why:
    Sometimes the Flash movie is designed so that it really shouldn't be smaller than a certain size(let's say 900x800). If it's smaller than this size, things overlap, and areas which don't fit onscreen become unreachable, crippling usability. The normal solution is to explicitly set the embed size to 900x800, which will put scrollbars(annoying as they may be, they maintain usability) on the user's browser if it is too small, say 800x600. But the problem is, then it will never be bigger than the explicitly set size either, so if the users screen is actually bigger, the document won't fill the screen size.

    So, what I would like to do is be able to somehow set the width/height of the Flash movie to stretch to screen size, but never go below a certain screen size either. This way if the screen is too small it will enforce scrollbars and not make portions of the movie unviewable, but also if the user's screen is big enough it will stretch to match the screen, thus filling background, ect. Make sense?

    I'm thinking the HTML embed tags have to somehow be set to be explicit widht/height(900px - 800px) if the user's screen is too small(thus enforcing scrollbars), or 100% if the users screen is big enough. JavaScript?

    Thanks for reading, I know it's a long and somewhat tricky to explain problem, but I would *really* like to be able to do this. Thanks.
    Last edited by >flashl!ght<; 08-13-2005 at 11:23 AM.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

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