|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
moving button problem
Im trying to make a moving button, one that is constantly moving slowly around until mouseover, where the animation stops, and something happens.
My problems are these: I can get the button to stop the animation, but the way im doing it means that i have to do an action for every frame of animation. Surely theres a way of just saying 'for all instances of this button, do this' problem two is very similar. Once the animation stops, i want the button to kind of expand to explain what its subheadings are etc, i assume that should all be done within the button animation [ie insert frames into 'mouse over' section. Again though, i can currently only apply this per instance. Anyone able to help? ![]() |
|
#2
|
|||
|
|||
|
as long as all instances of your button are named you only need to do this once, from the main timeline:
Code:
moving_btn.onRollOver = function() {
this.stop();
}
moving_btn.onRollOut = function() {
this.play();
}
then to implement to tolltips on mouseover you need another mc on the first frame of moving_btn, with nothing but a stop() action on it's first frame....then name the next frame "display" or something and change your code to: Code:
moving_btn.onRollOver = function() {
this.stop();
this.tooltip.gotoAndStop("display");
}
moving_btn.onRollOut = function() {
this.play();
this.tooltip.gotoAndStop(1);
}
|
|
#3
|
|||
|
|||
|
i couldnt get that to work, i got an error, but i found this:
http://www.webwasp.co.uk/flash-samp...utton/index.htm so problem is solved. Thanks anyway mate! ps error was: Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on handler moving_btn.onRollOver = function() { Scene=Scene 1, Layer=Layer 1, Frame=1: Line 5: Statement must appear within on handler moving_btn.onRollOut = function() { unfortunately im new to this flash game so i couldnt really figure out what it meant. Doh. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > moving button problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|