PDA

View Full Version : class var to dynamic text


kiwi1066
08-07-2009, 04:12 PM
Hi, this seems like an easy question but I can't find the answer anywhere. I am working on learning about classes.
What I have is a class that has a list of quotes as strings. each quote has a variable assigned.
A function that selects the right quote based on the day and assigns it a var name of rQuote
On the stage I have dynamic text field named quote1

Question:
How do I get the variable rQuote from the class to the Dynamic text field?

tango88
08-11-2009, 06:27 AM
Hi Kiwi,

You will need to use an import:

import flash.text.TextField;

I trust you know where to put it.

Then the following should work fine:

quote1.text="knowledge is powder";