|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Flash If Statement
Hello, Ok this is a bit hard to explain so I am going to give a description of what I have.
I made a Flash Menu. The rollovers are animations. The way the time line works is there are separate sections, 1 for each menu button. Frame 1 has a STOP on it and shows all the main buttons, the you would move the cursor over one of the buttons and there is a onRollover GoToAndPlay(frame whatever). The particular button has an animation that lowers the sub buttons down then there is a STOP. When the cursor is moved off the particular button or the sub menu area (using an invisible buttons around the parameter) the animation is aloud to continue (GoToAndPlay the next frame to finish the animation) letting the sub menu retract back up. Then on the last frame of that particular button there is a GoToAndPlay(1st frame of the movie), which put everything back the way it was. Ok now you have some background and hopefully an understanding of what I made here and how it works. Here is where my problem lies. The menu does lower and contract back up. Where its messing up is when the cursor is taken off one button and placed on another... the 1st menu does retract (which after retracting the frame command tells it to go back to the 1st frame). But I have to place the cursor back over the next button twice to make the next button do its thing. I know why its doing it, just not sure how to correct it. I cant upload an image .Can I do this.... On the last frame of the animation. Have an IF statement that would say something like.. If (on(RollOver) 'A') { GoToAndPlay('A') ElseIf (on(RollOver) 'B') { GoToAndPlay('B').... and so on. Something like this possible? Thanks. |
|
#2
|
|||
|
|||
|
Hi, you could set a variable with the onRollOver method for each..i.e.
var whichOne; myButt.onRollOver = function() { whichOne == _name; } then check value of whichOne i.e if(whichOne == "butt1") { //do something } Thats pretty ruff but it should give you the general idea. Cant you use the onRollOut function?... |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Flash If Statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|