Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables on drop down menu

Status
Not open for further replies.

flashymark

Programmer
Dec 4, 2001
3
GB
I am trying to use the menu smart clip that comes with flash 5.

I want to use it as part of a form. I am also using text boxes in the form
and they work fine but when it comes to the menu box there doesn't seem to
be a variable.

How do I make the item selected by the user in the menu into a variable so
that it will be sent along with my other form variables?

 
I would set up a global variable by typing in

gVariable = NewValue;

If you say

var gVariable = NewValue;

Then that is a local variable, only visible within that area of code (frame, movie clip, button, etc...) Inside of each different menu item (menu items acting as buttons, use on (press) or on (release)) put a different value inside the global variable. (i.e. gVariable = 1;) Then when the submit button gets pressed, do something to the effect of
Code:
var DropDown = "";

if (gVariable==1) {
    DropDown = "?MyVar=1"
}
etc, etc...

if this doesn't make any sense, I'll get a little more detailed.

Kevin
 
Thanks for your help Niv3K.

Please do get a little more detailed.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top