# \[mx\] delete onEnterFrame - opposing actions

**URL:** <https://forum.kirupa.com/t/mx-delete-onenterframe-opposing-actions/22924>\
**Category:** flash\
**Created:** [June 10, 2003, 6:29pm UTC](https://forum.kirupa.com/t/mx-delete-onenterframe-opposing-actions/22924 "2003-06-10T18:29:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdzines](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kdzines](https://forum.kirupa.com/u/kdzines)\
**Post date:** [June 10, 2003, 6:29pm UTC](https://forum.kirupa.com/t/mx-delete-onenterframe-opposing-actions/22924/1 "2003-06-10T18:29:36Z")

</div>

hey everyone,

i’ve been struggling with this for a while.

i have a mc (named mask) which on enterFrame i want to go from \_yscale = 0 to \_yscale = 100 when a variable \_myClip.myBytes == 100;

simple.

onLoad there is also a variable called \_root.Section = 1;  
this sits inside a button.

i have another button with \_root.Section=2;

when i press this, i want the mask mc to go from \_yscale = 100 to \_yscale = 0 (so basically the opposite to what it was).

can’t do it!

i understand that the problem because myClip.myBytes is still = 100, but how do i get rid of that?

wrote this:

\_root.mask.\_yscale=0;  
\_root.holder.loadMovie(“pana1.swf”);

this.onEnterFrame = function(){  
if(\_root.holder.myBytes == 100){  
if(\_root.mask.\_yscale\<100){  
\_root.mask.\_yscale +=2;  
if(\_root.buttons.\_y\>105){  
\_root.buttons.\_y +=(105 - \_root.buttons.\_y)/10;  
}  
}  
}  
}

delete this.onEnterFrame();

buttons.onEnterFrame = function(){  
if(\_root.Section!=1){  
if(\_root.mask.\_yscale\>0){  
\_root.mask.\_yscale -=2;

```
	}
}
	
}

```

the myClip.myBytes var basically = 100 when pana1.swf has completed loading.

i thought using delete this.onEnterFrame would do it, but no!

any ideas?

thanks

kd

---

<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:** [June 10, 2003, 8:05pm UTC](https://forum.kirupa.com/t/mx-delete-onenterframe-opposing-actions/22924/2 "2003-06-10T20:05:34Z")

</div>

sorry i’m a dope!

figured it out

cheers
