This content has been marked as final. Show 2 replies
You could try adding an event listener for the scaled image. Take a look at some of the events for an Image such as the complete, updateComplete, resize or valueCommit. Call the build of your bitmap from the event responder method.
I am not sure which event(s) get executed after a scale but it may be one of the events mentioned above.
Although I didn't see an event for scaleX and scaleY, width and height do have an associated event (ResizeEvent), so I decided to use them for my scaling. I set up an event listener, and counted the events that had been fired, until they had been fired for each of the items that was to be scaled.
I checked to see whether it worked, and it seemed not to have. In fact, it seems to have given me the same result as I had without the event listener, so as far as I can tell, the event is being called at the beginning of the resize rather than when it is completed.
The problem isn't due to bad placement or sizing logic, as I've tested making the buffer visible, and it responds as expected, albeit with the resize flicker that I'm trying to eliminate. I am also certain that the draw is being triggered in the event listener, and have tested to make sure that there are no further resize events that I am not handling.
I'm honestly kind of baffled. How can I resize multiple interconnected pieces of content without a separation being visible to the user in the intervening frames?
Edit: I was able to tell when the image loaded by attaching a listener to the image that listened for the update event. I may be coming at this from the wrong angle, though, so I'm going to look into other ways to solve this problem as a whole.