Writing to a Specific Text Field in a Specific "Frame"?
Hello All,
First off I'm very new at this so bare with me if I'm not using the correct terminaology...
Ok so I'm modifying an existing Flash Program that someone here created a while back with Actionscript 1.0 and rewriting to
Actionscript 3.0. The Flash program reads in some XML Data using XMLSocket and I collect the data and save some of it into string variables.
Now when a certain piece of string data comes in from the XML Data, which contains the name of a specific "Frame" to display, I use
a switch statement to decide which of the 5 frames to display.
The "Movie" is called "WBDMovie"....
So lets say I receive the string that tells me to display "Frame 1". So I issue this command below to go to that Frame:
WBDMovie.gotoAndStop(1);
This command takes me to "Frame 1" and stops. Now in Frame 1 there are 5 "Text Fields" in this area all set to "Dynamic Text". Now, I'm
trying to write a string variable to one of these Txt Fields in this Frame but I keep getting an error for undefined variable. See the Error below:
*The "Text Field" is called "F1_agentsReady".
*The "String Variable" is called "agentsReady".
Line w/ Error: F1_agentsReady.appendText("Agents Ready = " + agentsReady);
ReferenceError: Error #1065: Variable F1_agentsReady is not defined.
at CSRBoard2013_fla::MainTimeline/dataHandler()[CSRBoard2013_fla.MainTimeline::frame1:104]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::XMLSocket/scanAndSendEvent()
So to write to this particular Text Field do I need to reference to the specific Frame that the Text Field is in?
I'm kinda confused how I was able to create another Text Field called "msgArea" which I placed in the Movie and can write to it (and its visible)
no matter what frame I'm currently displaying..?
Any suggestions would be much appreciated!
Thanks in Advance,
Matt
