Combine on- and onClipEvent-Handler

Hi!\r\rIs there any possibility to combine those two handlers.\rI want a movieclip changing its scale when a button is pressed.\rThe change I would write as this:\r\ronClipEvent(enterFrame) {\r if (_scale<200) {\r _scale+=10;\r }\r}\rBut I can’t write\ron (release) {\r onClipEvent(enterFrame) {\r …\r\rDo U understand what I want.\rIs there a way to realize it?\r\rMany THX\r\rHartwig

the on() handler is for buttons, you can’t put them on movieclips. you could put a button in the movieclip like this\r\ron(press){\rnChange = true\r}\r\rand then the code on the MC would be like this :\r\ronClipEvent(enterFrame) {\rif(nChange){\rif (_scale<200) {\r_scale+=10;\r}\r}\r}

you can assign an onEnterFrame event within an on(press) like this:

 \r\ron(press){\r\r   this.onEnterFrame = function(){\r\r      if(this._scale<200) this._scale += 10;\r\r   }\r\r}\r\ron(release){\r\r   this.onEnterFrame = null;\r\r}

\rincidentally, _scale isn’t a built in property.

Wow. so simple. I must have been blind!\rThe only thing I had to change was\r\ron(press){\r_root.nChange = true\r}\r\rand the code on the MC:\r\ronClipEvent(enterFrame) {\rif(_root.nChange){\rif (_scale<200) {\r_scale+=10;\r}\r}\r}\r\rThanks a lot!

Hi Supra!\r\rI haven’t seen your reply before posting mine. What are the consequences that _scale is not a built in property?\r\rH.