# Zoom in out

**URL:** https://forum.kirupa.com/t/zoom-in-out/2201
**Category:** Uncategorized
**Created:** [May 12, 2002, 12:27am UTC](https://forum.kirupa.com/t/zoom-in-out/2201 "2002-05-12T00:27:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 12, 2002, 12:27am UTC](https://forum.kirupa.com/t/zoom-in-out/2201/1 "2002-05-12T00:27:27Z")

</div>

HOW do I zoom in, out a picture? I mean a picture has a guy and a table. I want to make it a bit live by zoom into his face. Please give some advice. Thank you.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 12, 2002, 12:44am UTC](https://forum.kirupa.com/t/zoom-in-out/2201/2 "2002-05-12T00:44:39Z")

</div>

You could tween it or just change the \_scale along with the event handler of your choice (ie on (press) (enterFrame)  
Have fun.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 12, 2002, 12:53am UTC](https://forum.kirupa.com/t/zoom-in-out/2201/3 "2002-05-12T00:53:04Z")

</div>

You could do it something like this (simple example)  
onClipEvent (load) {  
//get the initial value for the scale  
scale = 100  
}

onClipEvent (enterFrame) {  
// if the scale is greater than zero  
if (scale \> 0) {  
// set the x,y scale of this object = scale  
this.\_xscale = scale  
this.\_yscale = scale  
// keep subtracting 5 from the a value  
// to decrease the scale all the way to zero  
scale-= 5  
}  
}

or you could use one version of the picture that is zoomed in & one that is zoomed out.  
Lay them ontop of on another & use a mask to create the enlarging effect.

Good luck
