Pass var value between classes
Hi quick question, I understand how individual classes can be used, what I am struggling with is passing info between classes
This package returns a value that shows the day number for the year basded on the date of the pc
package
{
import flash.display.MovieClip;
public class DayOfYear extends MovieClip
{
public var numberDay;
public function dayOfYear()
{
var tmp: Date=new Date();
var t1:Number=tmp.getTime();
tmp.setMonth(0);
tmp.setDate(0);
var t2:Number=tmp.getTime();
numberDay = Math.floor((t1-t2)/86400000);
trace(numberDay);
return;
}
}
}
So if I set the pc to Jan 9th the trace displays 9
Now I want to take that 9 and use it in
package // display quote based pc date
{
import flash.display.MovieClip;
import DayOfYear;
public class Quotes extends MovieClip
{
var q8 = "this is quote for day 8"
var q9 = "this is quote for day 9"
var q10 = "this is quote for day 10"
public function quotes()
{
//code that will take the day number and display the correct quote from the list of vars in a dynamic text field (called a_quote) on the stage
}
}
}
Question:
How do I pass what I can trace in DayOfYear to Quotes?
Any tips or tutorials on passing variables between classes would be appreciated, also a pointer on displaying the quote in a dynamic text field on the stage would be great.
Thanks in advance for your help