I have an input text box with the instance inputnameone. On another page I have a dynamic text box with the instance outputnameone. When I press button with the instance "submit", I want the information in inputnameone to go into output name one. From the basic as3 I've been able to learn I've written this actionscript:
submit.addEventListener(MouseEvent.MOUSE_DOWN, transfernameone);
function transfernameone(e:MouseEvent):void {
outputnameone.text = inputnameone.text;
}
This works fine if the output box is on the same frame as the input box, but not if the output box is on a later occurring frame. If it is on a later occurring frame, I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at filename_fla::MainTimeline/transfernameone()
How can I fix this?