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”,"_self");
}
code in my text which is a button instance name “bt” :
bt.onRollOver
{
cubemc.play();
};