Level And Experience

ok. say i have 2 dynamic boxes one named “experience” and the other “lvl”. how would i make it so that when experience is greater or equal to 1000, lvl goes + 1 i tried this but it doesn’t seem to work. Any suggestions?

[left] if (_root.exper>=100) {
_root.lvl += 1;
}[/left]
[left] [/left]
[left] [/left]

You want the text inside lvl to increase? You’ll have to convert the string to a number, add one, then convert it back to text and output that as lvl.text =

:hr:

Ok so how do you do that?

I don’t have flash in front of me at the moment but this will get you started

in your if statement:

  • set a variable equal to what is in the dynamic text field

  • lookup Number( ) in the flash reference. It converts whatever is in the parentheses into a number

  • add one

  • lookup String( ) in the flash reference. Same as Number but converts to text

  • set lvl.text = “your variable”

:hr:

Well the problem I see is that you named one textbox experience but the code refers to one name exper ensure you have the variables correct

o i meant to experience not exper. srry

Did that fix your problem?