Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   accessing parts of an instance in Actionscript/Flash (http://www.programmingforums.org/showthread.php?t=13533)

Writlaus Jul 11th, 2007 10:07 PM

accessing parts of an instance in Actionscript/Flash
 
I am using flash, and I have a symbol that has two dynamic text fields in it. I need to access the text fields, and I thought instanceName.textField1 would do it, but it doesn't. I tried searching for the answer, but I can't find one.

Is anyone familiar enough with flash and actionscript to help me out?

Swan Jan 15th, 2008 3:10 AM

Re: accessing parts of an instance in Actionscript/Flash
 
say "abc" is the name of the instance.
and "t1" and "t2" are the instance names of your text fields then,

abc.t1.text = " Hello" ;
abc.t2.text = "Wrtilaus" ;

would output "Hello" and "Writlaus" in the two textfields respectively.


All times are GMT -5. The time now is 9:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC