Thanks for coming back or if your here for the first time I'm glad to have you over. If your not familiar with the site, I have been putting my 3D duties on hold, to try to create a flash based video game, based on the highly popular DDR series. As I am beginning the actual programming process, I'm taking a step back to create a START page and adding another menu to the game interface. So I'll begin by explaining both menu's, the START menu is going to be a hard coded component based drop down menu, where as the second menu will be a flash based button menu. Let's begin with the component menu:
1. First, if you haven't read the previous post, here is my generic layout for the game, and I've transferred it to the START page. I've already added the text "Select a Skill Level" and so I'm ready to create my dropdown menu.
2. Next, select from the menu, Window, and then Components.
4. Use the Free Transform tool, to increase the horizontal scale of the Combobox. Why? Because it just looks better.
5. Now, lets fill it up with options. So go back to the Window Menu and choose Component Inspector.
6. We can't just input Words, into the ComboBox, because each position on the box, represents a number (everything is a number these days). The number will come into play during the programming portion. So I figure that I will have four skill sets, "Beginner, Intermediate, Hard, and Expert." Therefore, if the Values of the position begin at zero then I should only go up to 3, so click the 'plus' sign and keep adding numbers until you get to three.
Then click on the labels portion, and input in whatever titles you want to be selected by the menu, again for me it was "Beginner, Intermediate, Hard, and Expert."
7. So now to complete the layout before the programming, we have to include a button because just selected an option from the menu won't instruct Flash. Therefore, a button must be used. So I just put together a simple rectangle and converted it to a button and then put the word 'start' within the button.
8. Now select the ComboBox, and name the ComboBox in the Properties box. What did I name the box, 'ddrbox'
Next select the button and open the action panel. So here's the easiest part of the whole process.......that's just copying and pasting the following code that I have already written. Just replace the 'ddrbox' with the name of your ComboBox.
on(release)To modify your menu to do something else, you can replace the gotoAndPlay() with geturl() and you will be able to direct users to websites. In the second half of this tutorial, I'll explain how to make Flash button based menus, and stay tuned to the Making Flash DDR, series as I constantly update it with plenty of useful information.
if(ddrbox.getValue() == 2)
if(ddrbox.getValue() == 3)
Well, good luck and if you have any QUESTIONS, not 'oh my god I hate your freaking guys because you have no life and blog all day' type comments.