kiwi1066
08-10-2009, 01:24 PM
This is the code in the constructor of the package
public static function get getQuotesb() :String
{
var b221:String = "this is quote 221 ";
var b222:String = "this is guote 222";
var b223:String = "this is quote 223";
var b224:String = "this is guote 224";
dayOfYear = DayOfYear.getDayOfYear;
var quoteNumber:String = "b" + dayOfYear;
quote = quoteNumber;
trace(quote);
return quote;
}
based on today, quoteNumber is b222.
If I add in 'trace(quoteNumber); I get b222
Therefore I think it should trace "this is quote 222"
But it traces 'b222'
If I I replace 'quote = quoteNumber' with 'quote = b222'
I get the trace I was expecting ' this is quote 222'
Why does using the variable name not work? :confused:
public static function get getQuotesb() :String
{
var b221:String = "this is quote 221 ";
var b222:String = "this is guote 222";
var b223:String = "this is quote 223";
var b224:String = "this is guote 224";
dayOfYear = DayOfYear.getDayOfYear;
var quoteNumber:String = "b" + dayOfYear;
quote = quoteNumber;
trace(quote);
return quote;
}
based on today, quoteNumber is b222.
If I add in 'trace(quoteNumber); I get b222
Therefore I think it should trace "this is quote 222"
But it traces 'b222'
If I I replace 'quote = quoteNumber' with 'quote = b222'
I get the trace I was expecting ' this is quote 222'
Why does using the variable name not work? :confused: