4 Replies Latest reply on Oct 14, 2007 8:55 PM by JKringen

    Masked content height is counted!?

    JKringen
      I'm building a new full-page flash site and I have a Flash Scrollbar setup to automatically enable itself when the page content exceeds the Stage.height. Pretty basic. The problem here is that I have some components of this website, such as a image gallery, that uses a "filmstrip" style display to show all of the thumbnails. Again, basic concept with the clip of the thumbnail images simply masked. The issue here is that the _height of those thumbnail clips are included even though the content is masked! So, if I load enough thumbnails, the masked content eventually gets long enough to cause the scrollbar to appear even though the content is masked and technically the scrollbar isn't needed! How can I stop this _height from being counted? Seems pretty stupid that the _height of that masked content is being counter. Any ideas at all? Putting checks into the system for every component with masked content to offset this problem would be very cumbersome. Any help is greatly appreciated! :)

      -Jason Kringen
      jason@kringen.org
        • 1. Re: Masked content height is counted!?
          clbeech Level 3
          the scrolling thumbnail area must be part of the MC you're checking the height of, and anything within that MC will be included in the returning value, even if it's masked, it's still there, just not begin rendered outside the mask area. Perhaps you could point to the level or MC that the content is being loaded into, rather than the parent clip, this way only the loaded content height would be checked and you would only need to change the target path of the scrollbar code.
          • 2. Re: Masked content height is counted!?
            JKringen Level 1
            Thanks for the reply. That's what I was afraid of. The scrollbar I use bases it's calculations on the height of the root container clip that holds everything in the site. Which is of course the way it should be to catch any items that exceed the stage height. I guess I'm going to have to come up with a system to register masked content height in any component that is on the stage and make sure to offset the stage height by that amount. Seems like masked content should not be counted though. I haven't tested this with and Flex/AS3 apps yet, I hope that's something that is different there. Thanks for the reply again.

            -Jason Kringen
            jason@kringen.org
            • 3. Re: Masked content height is counted!?
              clbeech Level 3
              Hey you're welcome. I would still consider, since you must have access to the Component codes, that you point the scrollbar system to read the level that the content is being loaded into, this may solve the problem if you can target either that level or MC instance. Just a though :) good luck.
              • 4. Re: Masked content height is counted!?
                JKringen Level 1
                Hey, I think I may have come up with an idea and have started coding it. I unfortunately have to have the scrollbar pointed at the very root container becuase this site if a 100% full flash site that has multiple components/pages that can, at any time, exceed the stage height and I need that scrollbar to automatically appear when that happens. What I've started is created a static class called MaskedContentRegistry that allows any movieclip to define masked content that it is showing. The MaskedContentRegistry class keeps a list of all masked content currently being displayed and determines if in fact the "viewable" content actually exceeds that stage height or not by calculating the difference between the mask height and the masked content height, etc. Trying to finish that up and it seems that that may solve the problem. Thanks again for the help. :)

                -Jason Kringen
                jason@kringen.org