# Can I make movie's act like buttons?

**URL:** <https://forum.kirupa.com/t/can-i-make-movies-act-like-buttons/241435>\
**Category:** flash\
**Created:** [October 14, 2007, 1:07am UTC](https://forum.kirupa.com/t/can-i-make-movies-act-like-buttons/241435 "2007-10-14T01:07:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyWorld](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@TonyWorld](https://forum.kirupa.com/u/TonyWorld)\
**Post date:** [October 14, 2007, 1:07am UTC](https://forum.kirupa.com/t/can-i-make-movies-act-like-buttons/241435/1 "2007-10-14T01:07:06Z")

</div>

I am using the following code to make movie objects fade in an grow as the mouse gets closer to them, but I want them to act as buttons when you are over them. is this possible without changing them into buttons? or can you apply this type of effect to a button (I tried doing it to the object for each stage of the button but it doesn’t seem to work)

also I would prefer to have the object grow less gradually (I would prefer it to happen when the mouse is closer than it is)  
thanks for any help

> onClipEvent (enterFrame) {

xdist = Math.round(\_root.\_xmouse - this.\_x);  
ydist = Math.round(\_root.\_ymouse - this.\_y);  
distancefromthis = Math.round(Math.sqrt((xdist_xdist) + (ydist_ydist)));  
this.\_alpha = (200-distancefromthis)+ 20;  
if ((200-distancefromthis)+20 \> 100) {  
this.\_xscale = (200-distancefromthis)+20;  
this.\_yscale = (200-distancefromthis)+20;  
} else {  
this.\_xscale =100;  
this.\_yscale = 100;  
}  
}
