-
1. Re: Continuous go to next/previous frame on mouseover
Ned Murphy Jan 31, 2011 1:04 PM (in response to Andy Bay)You should show your attempts to get things working. Overall, you should not think of the buttons as being the objects that create the movement along the timeline, they should only trigger it starting/ending and dictate which direction. Rolling over one of the buttons could start a Timer and set a direction variable. The Timer's event handler function would be in charge of commanding nextFrame() or prevFrame() based on the direction variables value (forward vs backward, for example) and rolling off the button would shut down the Timer.
-
2. Re: Continuous go to next/previous frame on mouseover
Andy Bay Jun 8, 2011 8:37 AM (in response to Ned Murphy)My attempts are too amateurish so showing them isn't useful
What I don't get is why can't I simply tell a button "When the mouse is over you, proceed to next frame" and another button "When the mouse is over you, proceed to previous frame" and have that happen continuously so that as long as the mouse stays over the button, it will always proceed to the next/previous frame? Is there something in the nature of Actionscript code that makes that impossible?
-
3. Re: Continuous go to next/previous frame on mouseover
Ned Murphy Jun 8, 2011 8:52 AM (in response to Andy Bay)Yes, I just described it for you. But I won't be writing it for you... it's easier (less work) for me to work with something that's already been attempted. Someone else might though, so if you don't want to show what you've tried you can wait and see if someone else will do it for you.
-
4. Re: Continuous go to next/previous frame on mouseover
Andy Bay Jun 8, 2011 9:13 AM (in response to Ned Murphy)Okay I will post my attempts soon, but you will probably laugh as I'm very new to actionscript coding..
-
5. Re: Continuous go to next/previous frame on mouseover
Andy Bay Jun 8, 2011 9:29 AM (in response to Andy Bay)Okay, here is what I have:
button_1.addEventListener(MouseEvent.MOUSE_OVER, fl_ClickToGoToNextFrame_3);
function fl_ClickToGoToNextFrame_3(event:MouseEvent):void
{
nextFrame();
}It works only for one frame at a time, in other words I have to shift my mouse on and off the button to have the movie proceed. The question I'm trying to solve is that why wont the button stay on as long as the mouse stays over it, always proceeding to a new frame?
-
6. Re: Continuous go to next/previous frame on mouseover
Ned Murphy Jun 8, 2011 9:51 AM (in response to Andy Bay)The answer to your question is that the MOUSE_OVER event is triggered by the rolling over occuring, not from the state of being over. So as I described ealrier, what you will want to do is have your mouseover function start a Timer and have the Timer's TIMER event handler function deal with executing the nextFrame() calls. You could use an ENTER_FRAME event lsitener/handler instead of a Timer, but you probably want more control of how slowly the nextFrame() calls occur.



