|
-
Flash CS4 - Mouse state control
I have a flash menu.
It has 8 buttons on the stage.
Each button has a up state and over state
To show the user how this menu works i want to simulate a mouse over on each button, from button 1 through to button 8. With perhaps a few seconds delay between each mouse over.
I found some action script that advances the frame after a specified time but it doesn't actually trigger the mouse over state.
Any help would be appreciated.
Don
-
This is a fairly long solution but it's how I would've fixed this (so no gaurantees )
Instead of having normal buttons with up and over states make them movie clips with the up and over states set out in the timeline (with appropriate stop actions). Now you can do the following:
buttonName.addEventListener(MouseEvent.MOUSE_OVER, handleOver, false, 0, true);
function handleOver(e:MouseEvent) : void {
e.target.gotoAndPlay("overState");
e.target.addEventListener(MouseEvent.MOUSE_OUT, handleOut, false, 0, true);
}
function handleOut(e:MouseEvent) : void {
e.target.gotoAndPlay("upState");
e.target.removeEventListener(MouseEvent.MOUSE_OUT, handleOut);
}
that takes care of the mc -> button conversion. The clips will work just like buttons for you now, and since they're movie clips you can now use the advancing frame script ...
hope that works out for you
-
Wow... its not a simple thing to do is it! My action scripting ability is, well... not that great but i will give your solution a go.
Thanks heaps for your time and effort.
Don
-
you're welcome. post here if you get stuck and I'll do my best to help you along.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|