Search Tutorials
Menu Button Code
On (Release)
If (menu = 0)
Go to and Play ("menuout")
Set Variable: "menu" = "1"
Else If (menu = 1)
Go to and Play ("menuin")
Set Variable: "menu" = "0"
End If
End On
What we are doing here is testing for the variable "menu". And since we are on the main time line we can just use "menu". If we were inside a movie clip we would have to target it differently. Once our little script finds the current value of the variable "menu" it directs the main timeline to a frame with a certain label and tells the variable "menu" to set itself to a different integer. These integers help define what action the button performs.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|