Hello and thanks for clicking
Now while I am not a complete newbie I am far from an expert in this, so instead of using terms I hardly understand myself I'll just give a rough outline of what I need for this project to work
I am currently working on a turn-based point-and-click strategy game in flash. Now like most strategy games gathering resources is important, and in this game there are currently four resource bases, a forest, a gold mine, a lake and a stone mine.
What I need is for the player to be able to click on, for example, the forest, in which case a dynamic text will become visible. Now I need the player to be able to insert an ammount of soldiers. That ammount will be sent to claim the resources of the base. So basically I need the ammount that is typed in the dynamic text to be retracted from the "soldiers" var and added to the var representing the soldiers in the forest.
Any help on how to achieve this would be appreciated
Thanks in advance
A textfield has a "text" property. So if you have a variable that you want to assign the textfield's entry to, then you assign it using...
yourVariable = textfieldName.text;
If you want that variable to be a Number, then you cast the textfield text as a Number when you assign it to the variable...
yourVariable = Number(textfieldName.text);
North America
Europe, Middle East and Africa
Asia Pacific