# Apply to all buttons?

**URL:** <https://forum.kirupa.com/t/apply-to-all-buttons/240833>\
**Category:** Uncategorized\
**Created:** [October 6, 2007, 11:44pm UTC](https://forum.kirupa.com/t/apply-to-all-buttons/240833 "2007-10-06T23:44:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![charmed](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@charmed](https://forum.kirupa.com/u/charmed)\
**Post date:** [October 6, 2007, 11:44pm UTC](https://forum.kirupa.com/t/apply-to-all-buttons/240833/1 "2007-10-06T23:44:41Z")

</div>

[actions script 2.0]  
Hi I am writing this code on a bunch of buttons and was wondering if there was a way I could apply some sort of generic thing like move the button 2spaces away. ? Instead of defining exactly where they go on x and y.  
Thanks in advance. Charmed

[SIZE=1]mc4.onRollOver = function(){  
var myTweenX:Tween = new Tween(mc3,"\_x",Strong.easeOut,mc3.\_x,939,.2,true);  
var myTweenY:Tween = new Tween(mc3,"\_y",Bounce.easeOut,mc3.\_y,176,.2,true);  
var myTweenX:Tween = new Tween(mc5,"\_x",Bounce.easeOut,mc5.\_x,920,.2,true);  
var myTweenY:Tween = new Tween(mc5,"\_y",Strong.easeOut,mc5.\_y,244,.2,true);  
};  
mc4.onRollOut = function(){  
var myTweenX:Tween = new Tween(mc3,"\_x",Strong.easeOut,mc3.\_x,935.3,.2,true);  
var myTweenY:Tween = new Tween(mc3,"\_y",Bounce.easeOut,mc3.\_y,183.9,.2,true);  
var myTweenX:Tween = new Tween(mc5,"\_x",Bounce.easeOut,mc5.\_x,929.8,.2,true);  
var myTweenY:Tween = new Tween(mc5,"\_y",Strong.easeOut,mc5.\_y,234.8,.2,true);  
};  
[/SIZE]
