# Calculate Zoom effect

**URL:** <https://forum.kirupa.com/t/calculate-zoom-effect/167083>\
**Category:** Uncategorized\
**Created:** [October 25, 2005, 10:54am UTC](https://forum.kirupa.com/t/calculate-zoom-effect/167083 "2005-10-25T10:54:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manga](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@manga](https://forum.kirupa.com/u/manga)\
**Post date:** [October 25, 2005, 10:54am UTC](https://forum.kirupa.com/t/calculate-zoom-effect/167083/1 "2005-10-25T10:54:40Z")

</div>

hey all,

Like my earlyest thread i am wroking on a 3d zoom function…  
how can i calculate it it best?

i have a placeholder\_mc:  
width: 400  
height:400  
\_x:0  
\_y:0

in the placeholder\_mc i have 10 obj\_mc’s:  
orig width:400, scaled in placeholder\_mc: \_xscale=20  
orig height:400, scaled in placeholder\_mc: \_yscale=20

the \_x and \_y are random positions

Now i need a formula that make the placeholder\_mc zoom into obj\_mc inside of him… and the placeholder\_mc must be \_xscaled, \_yscaled so that the width and height of the clicked \_mc are exaclty 400x400

for the \_x and \_y i use… onEnterframe=  
placeholder\_mc.\_x=placeholder\_mc.\_x+(placeholder\_mc.obj\_mc.\_x-placeholder\_mc.\_x)/8;  
placeholder\_mc.\_y=placeholder\_mc.\_y+(placeholder\_mc.obj\_mc.\_y-placeholder\_mc.\_y)/8;

so this makes the placeholder\_mc move to the correct postion of the clicked object but how can i scale it now he placeholder\_mc so that he moves and scales correct?

hehe i know it is a crappy explanation but anyhelp? please…

Cheers,  
M
