# Calling a function :-X

**URL:** https://forum.kirupa.com/t/calling-a-function-x/74063
**Category:** flash
**Created:** [December 23, 2004, 6:05am UTC](https://forum.kirupa.com/t/calling-a-function-x/74063 "2004-12-23T06:05:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Neil](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Neil](https://forum.kirupa.com/u/Neil)
#### Post date: [December 23, 2004, 6:05am UTC](https://forum.kirupa.com/t/calling-a-function-x/74063/1 "2004-12-23T06:05:49Z")

</div>

Arrrrggggggghhh… Ⓜ

I am just going nuts now…i forgot basic stuff like functions ! OMG :hr:

Please help me…I am trynna call resz function with a on(release) event handler, but it doesnt work ! 🅰

> \_root.onEnterFrame = resz;  
> resz = function (x, y) {  
> butx = base.\_x-base.\_width/2;  
> buty = base.\_y-base.\_height/2;  
> menu.\_x = Math.round(butx-menu.\_width+10);  
> menu.\_y = Math.round(buty+30);  
> xo = Math.round(this.base.\_width);  
> yo = Math.round(this.base.\_height);  
> xns = Math.round(xo+((x-xo)/9));  
> yns = Math.round(yo+((y-yo)/9));  
> this.base.\_width = Math.round(xns);  
> this.base.\_height = Math.round(yns);  
> this.sha.\_width = Math.round(xns);  
> this.sha.\_height = Math.round(yns);  
> };  
> stop();

* * *

## calling resz function

on(release) { \_root.resz(100,200); }

Problem : The button calls resz function just one time !, i wanna make it so that it repeats on entering a frame (onEnterFrame) …

I tried,

onEnterFrame.resz = function(x,y) { blah blha blah }

&

onEnterFrame = function resz(x,y) { balhbgbosigb }

but , blablhnbalnl doesnt execute ! , and if it does, then only once…☹
