Creating a Mail Form with PHP and Flash - Part 2 - Page 5
(Page 6 of 14 )
So we now have four buttons on our stage. Now we will add the text, select the text tool and enter Mr on top of the first button, Mrs on top of the second and so on.

Now when the user looks at the menu they will know the value of each button, but how will flash know, so we will attach some actionscript to each button.Select the top button and add the following code
on (release) { /:title = "Mr"; gotoAndStop ("hide"); } |
Let's break this code down line by line.on (release)perform this action when the mouse button is clicked then released/:title = "Mr";The variable title new value will be MrgotoAndStop ("hide");hide is the label of Frame 1 in the options menu, this means as our buttons are on frame 15 that when a button is clicked the dropdown menu will dissapear.Do the same for the remaining buttonsBut how do we get the menu to show and hide (the clue is in the frame labels)
Next: Page 6 >>
More Miscellaneous Articles
More By Codewalkers