Copy link to clipboard
Copied
I have the following code:
var myPercStr = myStr.text;
myPercStr= myPercStr.toString();
var myPerc = Number(myPercStr);
---------
I am trying to get the value of a text field which is created by the user pushing a pin-pad. This text field is a string which is joined() from an Array of the sequence of pin-pad entries. Now my problem is that Flash will not convert the .text text field into a string with which I can use the value to convert to a Number and perform math on it.
Can someone help me with my code?
Sincerely,
markerline
Copy link to clipboard
Copied
I solved it. myStr doesn't have a text property which is why this won't work. I have to call myStr by itself. It is already referencing the string of an Array from a previous function that returned its variable/value.
Copy link to clipboard
Copied
how to call mystr by itself