# Level And Experience

**URL:** https://forum.kirupa.com/t/level-and-experience/113326
**Category:** Uncategorized
**Created:** [June 16, 2004, 11:19pm UTC](https://forum.kirupa.com/t/level-and-experience/113326 "2004-06-16T23:19:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Krayzie](https://avatars.discourse-cdn.com/v4/letter/k/f05b48/32.png) [@Krayzie](https://forum.kirupa.com/u/Krayzie)
#### Post date: [June 16, 2004, 11:19pm UTC](https://forum.kirupa.com/t/level-and-experience/113326/1 "2004-06-16T23:19:55Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 11:28pm UTC](https://forum.kirupa.com/t/level-and-experience/113326/2 "2004-06-16T23:28:24Z")

</div>

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:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 11:33pm UTC](https://forum.kirupa.com/t/level-and-experience/113326/3 "2004-06-16T23:33:32Z")

</div>

Ok so how do you do that?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 16, 2004, 11:39pm UTC](https://forum.kirupa.com/t/level-and-experience/113326/4 "2004-06-16T23:39:51Z")

</div>

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:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 8:11pm UTC](https://forum.kirupa.com/t/level-and-experience/113326/5 "2004-06-17T20:11:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 1:02am UTC](https://forum.kirupa.com/t/level-and-experience/113326/6 "2004-06-18T01:02:54Z")

</div>

o i meant to experience not exper. srry

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2004, 8:02am UTC](https://forum.kirupa.com/t/level-and-experience/113326/7 "2004-06-18T08:02:09Z")

</div>

Did that fix your problem?
