3 Replies Latest reply on Jul 8, 2011 11:28 AM by BosDog

    adding html header to a flex app

    BosDog Level 1

      i have a header in my web app that i use on all my web pages (flex and non-flex pages). after i compile my flex app it creates the HTML file for me with the embeded SWF file. above the embedded SWF file I add in my header. this always produces a problem. i want my flex app to take up 100% height of the browser window below the header but it seems that the height of the header it pushes the flex app down the flex scrollbar to scroll down gets cut off (which prevents the user from scrolling down in the flex app).


      How do i overcome this? I tried setting the height of the SWF to a smaller percentage like this (87% in this case):


         "src", "main",
         "width", "100%",
         "height", "87%",
         "align", "middle",
         "id", "main",
         "quality", "high",
         "bgcolor", "#869ca7",
         "name", "main",
         "type", "application/x-shockwave-flash",
         "pluginspage", "http://www.adobe.com/go/getflashplayer",


      But then for users with high resolution you actually do see a blank white space below the Flex app. For users with even lower resolution the 87% may still be too much height and the flex scrollbar bottom is again cut off. Not the desired result.


      By default it looks like Flex wants to disable the browser scrollbar... and I do too since I do not want 2 scrollbars next to each other. Any ideas?

        • 1. Re: adding html header to a flex app
          BosDog Level 1

          no solutions here? maybe i should NOT be adding a html header above the flex app? what are other people doing then?


          Message was edited by: BosDog

          • 2. Re: adding html header to a flex app
            Claudiu Ursica Level 4

            Look into writing the flash file with swfobject library. It is basically a

            matter of having 2 HTML divs header, content. You put whatever you want inside

            header, write the swf inside the content.








            then you will use one of the of the javascript methods of swfObject and set the

            width and height as percent arguments

            swfobject.embedSWF("mymovie.swf", "flashcontent", "100%", "100%", "10", false,

            flashvars, params, attributes);


            you will probably need to apply some styles on the divs in html also



            #flashcontent HTH,




            It is doable with AC_FL_RunContent. but you need to play with the JS and HTML...

            • 3. Re: adding html header to a flex app
              BosDog Level 1

              none of these suggesstions have worked and i still have this problem with every new flex app. users with low resolution or lots of add-ons in their browser (like google search bar, etc.) cannot see the whole app on their screen and their vertical scroll bar is cut off preventing them from scrolling.


              i find it hard to believe that HTML cannot be included before a flex SWF app ... this is VERY frustrating. maybe deserting flex and switching to HTML 5 doesnt sound like such a bad idea now...