# How do I zoom in and out using Actionscript?

**URL:** <https://forum.kirupa.com/t/how-do-i-zoom-in-and-out-using-actionscript/123342>\
**Category:** Uncategorized\
**Created:** [September 22, 2004, 8:06pm UTC](https://forum.kirupa.com/t/how-do-i-zoom-in-and-out-using-actionscript/123342 "2004-09-22T20:06:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OM2](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@OM2](https://forum.kirupa.com/u/OM2)\
**Post date:** [September 22, 2004, 8:06pm UTC](https://forum.kirupa.com/t/how-do-i-zoom-in-and-out-using-actionscript/123342/1 "2004-09-22T20:06:43Z")

</div>

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

```auto
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
