Solved

MOUSEOVER BUTTON TO PLAY MOVIECLIP FORWARD AND IN REVERSE ON MOUSEOUT

Posted on 2003-11-01
2
637 Views
Last Modified: 2009-07-29
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.
0
Comment
Question by:madasczik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 9664646
• assign to the movieclip:

onClipEvent(load){
      this.forward = false;
}
onClipEvent (enterFrame) {
      this.forward ? this.nextFrame() : this.prevFrame();
}

• assign to the button:

on(rollOver){
      this.forward = true;
}
on(rollOut){
      this.forward = false;
}
on (release) {
      stop();
      getURL("http://www.somesite.com/index.cfm", "_self");
}
0
 

Author Comment

by:madasczik
ID: 9664692
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question