# Hi i need help with a code

**URL:** <https://forum.kirupa.com/t/hi-i-need-help-with-a-code/187776>\
**Category:** Uncategorized\
**Created:** [May 2, 2006, 8:13am UTC](https://forum.kirupa.com/t/hi-i-need-help-with-a-code/187776 "2006-05-02T08:13:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mxo22](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@mxo22](https://forum.kirupa.com/u/mxo22)\
**Post date:** [May 2, 2006, 8:13am UTC](https://forum.kirupa.com/t/hi-i-need-help-with-a-code/187776/1 "2006-05-02T08:13:39Z")

</div>

hi i have this code but it is not working on flash 8 i don´t know why please somebody can help me ?

onClipEvent (mouseDown) {  
if (i\>0) {  
return;  
}  
zoom = true;  
dir == 1 ? (dir=-1) : (dir=1);  
if (dir == 1) {  
pt = {x:\_root.zoom\_this.\_xmouse, y:\_root.zoom\_this.\_ymouse};  
}  
}  
onClipEvent (enterFrame) {  
if (!zoom) {  
return;  
}  
\_root.zoom\_this.\_xscale += dir_i_100/8;  
\_root.zoom\_this.\_yscale += dir_i_100/8;  
var pt2 = {x:pt.x, y:pt.y};  
\_root.zoom\_this.localToGlobal(pt2);  
\_root.zoom\_this.\_x -= (pt2.x-pt.x);  
\_root.zoom\_this.\_y -= (pt2.y-pt.y);  
i++;  
if (i == 10) {  
zoom = false;  
i = 0;  
}  
}

is a zoom effect but when i export in flash 8 it doesn´t anything,please help me.

I attached the file

thanks in adance
