5 Replies Latest reply on Jan 16, 2009 7:34 AM by clbeech

    setMask problem

      I'm perplexed, I'm using the setMask method in order to have an engaging transition in a photo slideshow. Everything works fine and dandy, but if you click off the site and the come back to it. The setMask method doesn't work. Not everytime mind you... but many times. When this happens I just see my opaque movieclip instead of a nice transition. I can't for the life of me figure out what is causing the problem... Perhaps someone on this forum can help clarify this issue for me....

      The site is www.cherrydesignbuild.com, go to projects and navigate through the slideshow.

      Here's the setMask code that I use

        • 1. Re: setMask problem
          clbeech Level 3
          hmmm... well part of the issue may be that the mask is getting 'reset' repeatedly within the onEnterFrame method - i would take out the lines:

          this.mcTransition.picture.cacheAsBitmap = true;
          this.mcTransition.mskBox.cacheAsBitmap = true;

          and place them just previous to the loop - also as above, I've changed the order to declare the cacheAsBitmap properties previous to setMask.

          • 2. Re: setMask problem
            yellowDev Level 1
            When I move the set mask and the cache as bitmap out of the onenterframe function....

            It consistently DOESN'T work.

            Does that giive you a better idea of what's going on?
            • 3. Re: setMask problem
              clbeech Level 3
              ahh yes, now i see. this preloader is handling the loading of the 'picture' and not the entire file - in other words, one can't apply those calls to something that doesn't yet exist ;) so here how i might restructure this:

              • 4. Re: setMask problem
                yellowDev Level 1
                cbeech, thanks for the idea...

                i changed the code around to reflect the new idea of applying setmask once the pic is loaded...

                however, the setmask is still messing up randomly generally when i leave the page open and mess around outside of flash and then come back....

                any other ideas?
                • 5. Re: setMask problem
                  clbeech Level 3
                  did you use the code 'just as' above?
                  if not - then have you made sure that the loop terminates?

                  also, 'where' does this code reside?
                  and is it 'reused' to load other images?