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!

I had a problem using variable.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Im kind of crazy doing about variables . How to get the password or a message. Some of the tutorials I take is very
confusing. Is there anyone who have an idea how to that.?
 
passwords in flash are not safe. there's apps around that can crack an swf, and get all the variables and stuff out of it.
However, i guess what you are asking is how to use input text. Make a text, under text options, select "input text". There's a box "Variable". let's call it "age". This textbox is a variable, its name is age, and the value is whatever the user puts in. Let's presume we want to ask the age to decide if some-one can enter the site. Some-one fills in: 12. Below the textfield there's a button that says: ENTER. here's the code of the button:

on(release){
if (age<=17) {
message=&quot;sorry, you're not old enough&quot;;
}else{
gotoAndStop(&quot;site&quot;);
}
}

&quot;message&quot; is also a textfield. it's a dynamic textfield, here, the &quot;Variable&quot; field says the word: message
whatever text you put in the field, if a user fills in 12 in the input age field, the message textfield will display : sorry, you're not old enough.

that's it. try and play with it.
 
Thanks Zom,
I got it, but I did not know that password is not safe.
That exactly what I want to know.How about the dynamic text using flash 4? Its like kind of hard because some of the action that I need to use in Flash 4 are not there.Unlike using flash 5. Its more functional when I try to use it before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top