A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Make flash site size of browser's client area

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    89

    Make flash site size of browser's client area

    How do I make a flash site the size of the browser's client area? I don't want to make the site full screen. Just the size of the browsers' client area. In other words (without the site being full screen), I want my site to be as large as possible without having to guess, and without the user having to scroll.

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I've done this, but I'd have to go back to look at how it was done. I do remember FireFox giving me a fit about it though.

    The Javascript was:
    Code:
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    
    
    <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','100%','height','100%','title','content','src','v4','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','v4' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%" title="content">
      <param name="movie" value="v4.swf" />
      <param name="quality" value="high" />
      <embed src="v4.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%"></embed>
    </object></noscript>
    Oh and to get it to work in both main browsers you need a little CSS trick
    Code:
    .content {
    	background-color: #CC6600;
    }
    
    body, html {
    	height: 100%;
    	color: #0099FF;
    
    }
    
    object {
    height: 100%;
    width: 100%;
    }
    Last edited by blanius; 01-06-2010 at 10:35 PM.

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    6
    I am also trying to do the flash size that fits the viewer's browser size, but I'm having problems. I used the code above and the preview in dreamweaver looks good, but when I upload it to the ftp site, it sizes to the whole page. Any suggestions?

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Try adding StageScaleMode.SHOW_ALL to your flash as well

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