Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error 1119: Access of possibly undefined property text through a reference with static type String

Mentor ,
Nov 30, 2010 Nov 30, 2010

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

TOPICS
ActionScript
515
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 30, 2010 Nov 30, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 03, 2020 Feb 03, 2020
LATEST

how to call mystr by itself

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines