# How to play an event handler?

**URL:** <https://forum.kirupa.com/t/how-to-play-an-event-handler/180543>\
**Category:** Uncategorized\
**Created:** [March 1, 2006, 12:55pm UTC](https://forum.kirupa.com/t/how-to-play-an-event-handler/180543 "2006-03-01T12:55:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)\
**Post date:** [March 1, 2006, 12:55pm UTC](https://forum.kirupa.com/t/how-to-play-an-event-handler/180543/1 "2006-03-01T12:55:48Z")

</div>

I’m creating a button to play an movie clip using onClipEvent() but I couldn’t get it works. It contains a button (text) and a cube (movie clip). On that movie clip I have a button.

I want the animation of movie clip play while my mouse is rollOver on my text. Does anyone know how to make that works??

here my example:

code in cube instance name “cubemc” :

onClipEvent (load)  
{  
elas = 1.200000;  
speed = 5;  
temps = 0;  
}

onClipEvent (enterFrame)  
{  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse))  
{  
this.ts = 160;  
}  
else  
{  
this.ts = 110;  
} // end if

```
this.ds = this.ts - this._xscale;
this.temps = this.temps / elas + this.ds / speed;
this._xscale = this._xscale + this.temps;
this._yscale = this._xscale;

```

}

in this movie clip, it contains a button with that code:

onPress()  
{  
getURL(“[http://www.yahoo.com](http://www.yahoo.com)”,"\_self");  
}

code in my text which is a button instance name “bt” :

bt.onRollOver  
{  
cubemc.play();  
};
