5 Replies Latest reply on May 23, 2006 9:54 AM by Joekin

    Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED

    Joekin Level 1
      Wondering anyone has experienced this ... Flex2 apps basically don't work in Firefox (or any Mozilla based browsers) if the flex app is big enough, say, width=2000px and height=4000px, so that the browser scrollbars (not scrollbars from flex app) are displayed. All mouse events can not be caught as expected when browser is SCROLLED! I think somehow flex is confused about viewport coordinates and global/document coordinates in Firefox.

      Almost every flex demo or example I have ever seen sets the width and height of the main swf as 100%, that way the browser scrollbars will never appear ... and maybe that is why people can barely observe this bug. Any thoughts from the flex2 developers? If you need a short and quick example, please let me know and I'll send you one.
        • 1. Re: Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED
          Level 7
          Can you please provide an example? Then I can take a look and see what is
          going on.

          Thanks,
          --
          Jason Szeto
          Adobe Flex SDK Developer

          "Joekin" <webforumsuser@macromedia.com> wrote in message
          news:e40ube$465$1@forums.macromedia.com...
          > Wondering anyone has experienced this ... Flex2 apps basically don't work
          > in
          > Firefox (or any Mozilla based browsers) if the browser scrollbars (not
          > scrollbars from flex app) are displayed and SCROLLED. For example, mouse
          > events
          > can not be caught as expected! I think somehow flex is confused about
          > viewport
          > coordinates and global/document coordinates in Firefox.
          >
          > Almost every flex demo or example I have ever seen sets the width and
          > height
          > of the main swf as 100%, that way the browser scrollbars will never appear
          > ...
          > and maybe that is why people can barely observe this bug. Any thoughts
          > from the
          > flex2 developers? If you need a short and quick example, please let me
          > know and
          > I'll send you one.
          >
          >


          • 2. Re: Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED
            Joekin Level 1
            Below is an example, simple enough to illustrate the issue. To test, please compile the first file into test.swf, and then access test.html from Firefox. Note that it works in IE. Since I can not Attach the code, the code embedded may be slightly messed up when posted. Pay attension to the big width and height I intensionally set in test.html. In this example, if you click the linkButton after scrolling the browser, the button won't respond. However, you'll see that the button become active if you point the cursor some distance (about the same pixels you scrolled) below the button. Thanks.

            ===== File 1: test.mxml =====

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
            width="100%" height="100%" horizontalAlign="left">
            <mx:Spacer width="100%" height="100"/>
            <mx:LinkButton id="lb" label="Say Hi" click="lb.label+=' again'"/>
            <mx:Spacer width="100%" height="100%"/>
            </mx:Application>

            ===== File 2 (swf wrapper): test.html =====

            <html>
            <body style="margin:0;padding:0;border:none;">
            <object id="test" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1400" height="4000"
            codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,5,0,0">
            <param name="src" value="test.swf"/>
            <param name="play" value="true"/>
            <param name="loop" value="true"/>
            <param name="quality" value="high"/>
            <param name="wmode" value="opaque"/>
            <param name="allowScriptAccess" value="always"/>
            <embed id="testEmbed" name="testEmbed" src="test.swf" width="1400" height="4000"
            play="true" loop="true" quality="high"
            allowScriptAccess="always"
            wmode="opaque"
            swLiveConnect="true"
            type="application/x-shockwave-flash"
            pluginspage=" http://www.macromedia.com/go/getflashplayer"
            </embed>
            </object>
            </body>
            </html>
            • 3. Re: Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED
              GordonSmith Level 4
              When I try your HTML wrapper I see the SWFs background color but not the LinkButton, so I'm not sure what's going on. But try reducing the 4000-pixel height. The Player actually has a limit of 4000 x 4000 pixels for the Stage and there are some known fixed-point-math overflow problems at that size 4000 that might be causing the problem.
              • 4. Re: Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED
                Joekin Level 1
                The LinkButton with label "Say Hi" is displayed on the left about 100 pixels away from the top. I compiled the test.mxml using the Flex2 beta3 sdk compiler. I retested the code with FlashPlayer 9, and the LinkButton is there even with height=4000 pixels. I changed the height to 2000 pixels, but the problem still persists. The test.mxml code is very simple, so if you still can not see the LinkButton, double check the code you should be able to find out why. Please let me know any progress. Thanks.
                • 5. Re: Flex2  apps don't work in Firefox if the browser scrollbars are displayed and SCROLLED
                  Joekin Level 1
                  Has anyone been able to reproduce this issue? Need help resolving this issue as it affects our decision on our ongoing project. Thanks.