# Easy onRollOver/Out

**URL:** <https://forum.kirupa.com/t/easy-onrollover-out/172220>\
**Category:** Uncategorized\
**Created:** [December 12, 2005, 4:28pm UTC](https://forum.kirupa.com/t/easy-onrollover-out/172220 "2005-12-12T16:28:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErikHK](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@ErikHK](https://forum.kirupa.com/u/ErikHK)\
**Post date:** [December 12, 2005, 4:28pm UTC](https://forum.kirupa.com/t/easy-onrollover-out/172220/1 "2005-12-12T16:28:39Z")

</div>

I want a button to increase in size while I have my mouse over it, and decrease when i drag it away, this code example doesn’t update every frame like onClipEvent(enterFrame) does…

```auto

on(rollOver){
_xscale += 10;
}

on(rollOut){
_xscale -= 10;
}

```

I want it more like:

```auto

onClipEvent(enterFrame){
if(rollOver){
_xscale += 10;
}

if(rollOut){
_xscale -= 10;
}
}

```

But that doesn’t work (of course), so how do I do it? I’ve tried  
this: [http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary097.html[url=“http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary097.html”]](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary097.html%5Burl=%22http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary097.html%22%5D)

but I can’t get that to work either… help!
