Link to home
Start Free TrialLog in
Avatar of madasczik
madasczik

asked on

MOUSEOVER BUTTON TO PLAY MOVIECLIP FORWARD AND IN REVERSE ON MOUSEOUT

How do I make a button that plays a movie clip forward on mouseover and play in reverse on mouseout?

I'm doing this wrong currently, but its the action I want my button to do.  Currently I am using this code on a movieclip symbol:

onClipEvent (enterFrame) { // runs a hit test
 if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
   this.nextFrame(); // if true the movieclip plays forward
 } else {
   this.prevFrame(); // if not plays backwards to beginning
 }
}

In the movieclip I have my animation and a stop(); on the first frame.

I also have a button in the movieclip that has the click area that I want to use and this code:

on (release) {
   stop();
   getURL("http://www.somesite.com/index.cfm", "_self");
}

My problem is that I don't want to use the movieclip as the click area, I want the click area of the button to activate the movieclip to play forward on mouseover, and in reverse on mouseout.  

Don't know how to make a button do this.

Any help would greatly be appreciated and 500 points to the expert with the solution.
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of madasczik
madasczik

ASKER