I’m trying to see if I can get a zooming effect to work. So far I have it working properly b/4 and after the zoom, but during the zoom effect the _xscale/_yscale seems to default the location of the movie to the upper left, and if you watch carefully you can see the zoom “stretch” into place instead of focusing on the particular location that the mask is supposed to focus on.
finally figured it out, had to make sure the adjustment x/y position
was being calculated based on the CURRENT x/yscale. so when i zoom from 100 to 180%... say its only @ 120, you need to do the x/y positioning based on the current scale.
basically the math.floor rounds up so there is less decimal calculations, and the +2 makes it so that you dont have to do another round of calculations, basically so you are not doing another calculation if you are already at 178% enroute to 180%.
I think you there is a way to do division w/o worrying about decimals (float maybe?)
Well the way to make it CPU efficient is to only assign the onEnterFrame handler when you need it, such as onRollOver. If you have it running all the time, it will use CPU all the time.
you can remove onEnterFrame handlers by doing