-
How do I put any value I want in any textfield?
Hi!
I know I'm thinking about this wrong, but I can't seem to get unstuck.
I have two input text fields on the stage with variables respectively called inputField1, and inputField 2. I would like to put any value I want in either one of these.
I tried to write a function:
function showValue(value,field){
numValue = Number(value); //value is coming from an external variable
trace(numValue + 20); //traces back a sum
field = numValue + 36;
}
showValue(dadAge,inputField1); //dadAge=18 is on the external .txt file
So I want the number 54 showing up in inputField1. And of course it's not happening.
Any help would be great!
Thanks!
-
Senior Member
change this:
to this:
Code:
field.text=numValue+36
-
Thanks!
I kept trying to track the variable name and not the instance name for some reason.
-
Senior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|