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

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

Mentor ,
Nov 30, 2010 Nov 30, 2010

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

TOPICS
ActionScript

Views

432

Translate

Translate

Report

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

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

how to call mystr by itself

Votes

Translate

Translate

Report

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