How do I zoom in and out using Actionscript?

How do I zoom in and out using Actionscript?
I have the following code to move an object around:

onClipEvent(load)
 {
     speed = 10;
     speedx = speedy = speed;
     targetx = this._x;
     targety = this._y;
 }
 onClipEvent(enterFrame)
 {
     _x += (targetx - _x)/speedx;
     _y += (targety - _y)/speedy;
 }

What I do is change the values of targetx and targety.

What I want to do is move the object and then zoom in or out.

So, I need to know:

  1. How to zoom in and out usng Actionscript.
  2. AND I need to know how I can do this at the END of the above animation?

Any help would be appreciated.

Thanks.

OM

the zooming is not a real zoom. You practically need to scale your movie up.


onClipEvent(load)
 {
     speed = 10;
     speedx = speedy = speed;
     zoomx = 200;
     zoomy = 200;
     targetx = this._x;
     targety = this._y;
 }
 onClipEvent(enterFrame)
 {
     _x += (targetx - _x)/speed;
     _y += (targety - _y)/speed;
     if (Math.Abs(targetx-_x) <10 || Math.Abs(targety-_y)<10) {
     _xscale += (zoomx - _xscale)/speed;
     _yscale += (zoomy - _yscale)/speed;
     }
 }


Try the code above… I haven’t tested because I don’t have flash installed this days… Tell me how it works.