1 Reply Latest reply on Sep 8, 2011 2:08 PM by hbllproductionunit

    Scale event listener

    hbllproductionunit

      I'm trying to run some code after scaling has been completed. What I am doing is loading in large images (3-15 megs) into a Scroller. I am waiting for 2 images to load in, then I want to scroll to a specific location. The problem with that is that I also want to adjust the size (using scaleX, scaleY on each image), which seems to throw things off.

       

      Currently, I move the scroll bars on the "complete" event, fired when the mx.Image object has loaded the new content, but I find that sometimes the scaling isn't finished yet, so it winds up in the wrong spot. Ideas? This is somewhat time critical, so any immediate help would be appreciated.

        • 1. Re: Scale event listener
          hbllproductionunit Level 1

          Ok, I have played around with it, and tested it a bit more. The scaling isn't the thing throwing it off in most cases--for some reason, on the "complete" event fireing, Flash simply doesn't scroll to the right place. Often, it will scroll vertically correctly, but not horizontally. I am using scroller.horizontalScrollBar.value = value_to_scroll_to for horizontal scrolling and same except verticalScrollBar for the vertical direction. What might be going on?