3 Replies Latest reply on Sep 15, 2007 2:25 PM by bionotavailable

    Stage.height x html margins

    bionotavailable
      i’ve found a curious bug here. flash cannot check Stage.height if you set all html margins to zero. here is the test i’ve done:

      var txt:TextField = this.createTextField(“txt_fl”, 0, 0, 0, 300, 50); onEnterFrame = function() { txt_fl.text = Stage.height; }

      the problem is when you are using firefox, in this flash tab, then move to another tab and resize the window to a smaller size. when you come back to the flash tab, you will notice that the textfield with the stage height haven’t change the information.

      once you set top margin to 1px, the bug disappear. i’ve finished my fullscreen scrollbar code, and I cannot make flash check the Stage.height to adjust the bar with the window size. all others fullscreen scrollbars i’ve seen so far have this problem also.

      any ideas? where can I post bugs to adobe?

      obs. AS2. don't know how this works in AS3. maybe it's already corrected.
        • 1. Re: Stage.height x html margins
          clbeech Level 3
          sorry this is not a bug.

          1) The code you have above, you are attempting to set the 'txt_fl.text' value, which would be the actual text in the field, to the value of the Stage.height.

          2) The Stage's size does not change once published and can only be change in the authoring tool, the swf is being 'scaled' if you have it set to do so, but the size of the Stage will always remain the same.

          3) if you are trying to adjust the height of the textField you should adjust the field's _height property, which can be set to the Stage's height, but you will only need to do so once, not within a running loop.
          • 2. Stage.height x html margins
            Juankpro Level 2
            I thinks this is not a Flash Player bug. Just think about this.

            When you resize the browser, is the browser that tells the Activex or PlugIn that the size has changed.

            When this happens the PlugIn tells that to flash, and flash receives an onResize event that updates Flash size information.

            If this information is not been refreshed with a margin of zero there is a lot of probability that the browser is the one not changing the control size and not the FlashPlayer the one not recognizing it.

            So maybe the bug goes beyond flash.

            Remember though that for detecting size, the SWF file should be set to width and height of 100% in the publish settings and that Stage.scaleMode should be set to "noScale" and Stage.align to "TL".
            • 3. Re: Stage.height x html margins
              bionotavailable Level 1
              juankpro, you're right. i think it's more like a firefox bug...

              "Remember though that for detecting size, the SWF file should be set to width and height of 100% in the publish settings and that Stage.scaleMode should be set to "noScale" and Stage.align to "TL"."

              yeah. i'm using a fullscreen application. that's why clbeech didn't get the test. he wasn't publishing correctly.