How to decode text into a function parameter?

Hey everybody,

I’m new here :sombrero: and also pretty new with flash. For some time I’m trying to figure something out and I think it will be easy to solve for the some more experencied flash users :genius:, so that’s why im now trying to find the answers here, hope you guys can help me.

Simply said, I want to have an inputtextfield, a button that is linked to the textfield and a dynamic textfield as an display, to display stuff, which comes from the inputtextfield and the button.

Then, I want to have items in the actionscript, like item1 = 5, or item1 = 1a, or 1a = item1. Just some code that equals to another code. But for now item1 = 5.
For the button that is linked to the input textfield, has to calculate something when pressed and the dynamic textfield will display it. So if I would type in the inputtextfield 5 and press the button, it will be as example multiplied by 2, so the dynamic textfield will show 10.

Still following? The point is, I know how to set something like that up, but what I want is that when I type item1 in the textfield (which equals to 5) and press the button the dynamic text will show 10, because “2 x instance name inputtextfield” (in which intem 1 is typed, which equals 5) should be 10 right? But when I try to do this, the dynamic text will show nothing or some error. but when I type directly in the code “2 x item1” and press the button it will show 10. But I want it to double link, so "2 x (instancename inputtextfield which equals to what is typed in the field, this case: item 1 which equals to 5) and not that it stops to item1, so it will freak.

So does anybody know how to do this? It will be very much appreciated!