1 Reply Latest reply on Mar 25, 2011 8:56 AM by hawkeye2205

    browser scrollbar if needed - Flex 4

    Cultivate Designs

      I'm  working on a flex project and I'm trying to  resize my application  based on the content being displayed in the  current state. I'd like the  wrapper to resize in the browser so that the  browser's scroll bar  appears if needed, which would be dependent on the  user screen size.


      I believe this needs to be done using Javascript but I haven't been able to find any good resources or examples.


      I'd really appreciate any input.

        • 1. Re: browser scrollbar if needed - Flex 4

          you just need the other way to embed the swf file..

          try this


          <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
                    <!-- Set the style-->
                  <style type="text/css" media="screen"> 
                      html, body  { height:100%; }
                      body { margin:0; padding:0; overflow:auto; text-align:center; 
                             background-color: #ffffff; }
                         <!-- Include support librarys first -->          <script type="text/javascript" src="swfobject.js"></script>
                    <script type="text/javascript" src="jquery-1.4.4.js"></script>
                         <!-- Start Embed swf to the div target -->
                    <script type="text/javascript">               
                         function init(){
                         function swfContent() {
                              //Show the SWF
                                   $('#flashContent').append('<h1>You need at least Flash Player 9.0 to view this page.</h1><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" /></a></p>');                         
                                   //A 'name' attribute with the same value as the 'id' is REQUIRED for Chrome/Mozilla browsers
                                   swfobject.embedSWF("Main.swf", "flashContent", "955", "600", "9.0", null, null, null, {name:"flashContent"});
                    <div id="flashContent"></div>