Many Textfield instances can hold a refrence to a single variable via the 'variable' property, and so, when the variable changes, so does the Textfields value.
H On 12/8/05, Ralph Caraveo <[EMAIL PROTECTED]> wrote: > > Looks like String objects are passed by value instead of by reference. > > > //create a string variable > var myVar:String = "Bob"; > //create another string value using the myVar value > var myVar2:String = myVar; > > //change the original myVar value > myVar = "Lucy"; > > //trace myVar > Trace(myVar); //outputs "Lucy" > > //trace myVar2 > Trace(myVar2); //outputs "Bob"; > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pete > Hotchkiss > Sent: Thursday, December 08, 2005 5:08 PM > To: 'Flashcoders mailing list' > Subject: RE: [Flashcoders] Display same value in 3 fields > > To state the obvious. > > Why cant the text fields point to a single variable ? > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pranav > Negandhi > Sent: 08 December 2005 16:57 > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] Display same value in 3 fields > > > Bit of a glitch. I need to display the same value in 3 different > locations and was wondering if it's possible to do it in any way other > than setting values in 3 text fields. > > What I'm doing right now - > Field1.text = "OK" > Field2.text = "OK" > Field3.text = "OK" > > What I'd like to do - > GlobalField.text = "OK" > [change propogates to 3 instances of the movieclip] > > I played around a bit with static class variables and feel it might be > the right way. Any pointers anyone? > > Regards, > Pranav Negandhi > > Fractal | ink > O: 91 22 5660 3682 > M: 91 98211 73656 > www.fractalink.com > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders