Skip to main content
Known Participant
March 4, 2014
Question

1119: Access of possibly undefined property nameInput through a reference with static type Class.

  • March 4, 2014
  • 1 reply
  • 3035 views

Hi

I have had problems with the input code and keep getting this error: 1119: Access of possibly undefined property nameInput through a reference with static type Class.

The code is here below

function captureText():void

  {

   var myText = Page5.nameInput.text;

   Page6.nameOutput.text = "Hello "+myText+"!"

  }

Page 5 is the page the input is on

Page 6 is where the outpu is

nameInput and nameOutput are my text area and dynamic text boxes
Apparently they are static classes??

Any ideas will be greatfully appreciated

Thanks

This topic has been closed for replies.

1 reply

Inspiring
March 4, 2014

always type your vars:

so it should be:

   var myText:String = Page5.nameInput.text;

   Page6.nameOutput.text = "Hello "+myText+"!"

then:

make sure that when you call captureText(), Page5 and Page6 (which I guess are Sprites/MovieClips) are part of the current Displaylist

if you are for example on Scene5 of your file and Page6 is on Scene6, calling Page6 will throw an error, because Flash can`t find it on its current DisplayList

Known Participant
March 4, 2014

Thanks for your response

I have just tried this and I still have the same errors.

Can you suggest anything else ?

Thanks

Ned Murphy
Legend
March 4, 2014

The error appears to be indicating that the words Page6 and/or Page5 represent class names, not movieclip instance names.  How are these names defined?