|
Post by Matt on Sept 6, 2006 16:33:58 GMT
To be honest it annoys me when people have nice fancy rollovers, but then as soon as you roll off it, it jumps to the rollOut animation, making it look messy. Here's how to avoid that: Make a square/rectangle, right-click > convert to symbol > movieclip, call it whatever you like. Go back to the timeline, click the movieclip and open the properties panel, give it an instance name of "my_Btn". Open the movieclip and edit the animation to suit how you want it, then add stop(); to the first frame. Now click back to the timeline that the button is on and click the frame on the main timeline then press F9 to open the actions layer. Enter the following code: MovieClip.prototype.hitMe = function() { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { this.nextFrame(); } else { this.prevFrame(); } }; _root.my_Btn.onEnterFrame = function(){ this.hitMe(); } that should work a treat
|
|