Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Johannes Nel
either container_mc.messageText.text = messageDisplay(); or public function get displayGreeting():String { if (now == afternoon) { message = Disco Rules; } else { message = Samba Rules; } } On

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Andy Johnston
Whats the problem? Hi, The code would be helpful :) /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300;

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Johannes Nel
forgot the return statement in there nction get displayGreeting():String { if (now == afternoon) { return message = Disco Rules; } else { return message = Samba Rules; } On 1/12/06, Andy Johnston [EMAIL

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Andy Johnston
class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var stageWidth:Number = 300; private static var textFieldDepth:Number = 0; private var messageFormat:TextFormat; public var now:String =

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Johannes Nel
rutbum. s if (now == afternoon) { return Disco Rules; } else { return Samba Rules; } On 1/12/06, Johannes Nel [EMAIL PROTECTED] wrote: forgot the return statement in there nction get displayGreeting():String {

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread bryan.rice
You have to return the value of message: private function displayGreeting() { if (now == afternoon) { message = Disco Rules; } else { message = Samba Rules; } return

Re: [Flashcoders] Using a Function as Variable[code]

2006-01-12 Thread Chris Kennon
The following returned undefined: /** A Simple hello class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.Hello { private var width:Number; private var height:Number; private var stageHeight:Number = 300; private var