AS2 Increase size of image while centering

I have a flash movie that when you click on the button "Decrease" the image shrinks in size. That works great except it's shrinking centered default on x=0 y=0 coordinates. I'd like to make it shrink at a specific coordinate x=961.75 y=365.70

This is the code I have for the button that works. How can I decrease the size centered on the specific coordinate?

on (press) {
      if (index < scaleSize.length && largemap._alpha == 100){
            largemap._xscale += 10;
            largemap._yscale += 10;
            SCALE.text = scaleSize[index--];
			SCALE2.text = SCALE.text;
      } else if (index < 0.5)
		  SCALE.text = "";
		  SCALE2.text = SCALE.text;

Open in new window

Who is Participating?
GabriologistConnect With a Mentor Commented:
Your issue lies around the *registration point* of the largemap movieclip. Transforms (scales / rotations) use the registration point as the 'centre' of the clip when making the change.

I've always fixed these issues by entering a clip (edit it) and moving the content of a movieclip about until the relative positions of the content and the registration point were what I wanted. This is *really* easy to explain visually, but tough to do it in words, so sorry if that explanation passes you by. Try this - enter your movieclip and move your content about - say 200 pixels right and 300 down - run your movie and see how the behaviour of your zooming changes... Keep repeating this until you get (by iteration) your content in the right place of the movieclip to get the zooming behaviour you want.

I've also found a more visual description of this -
jj1103Author Commented:
Duh...such an oversight on my part. Yes, this worked. Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.