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 PROTECTED]> wrote:
>
> 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;
> >     private var stageWidth:Number = 300;
> >     private static var textFieldDepth:Number = 0;
> >     private var messageFormat:TextFormat;
> >     public var messageDisplay:Function = displayGreeting;
> >     public var message:String = "";
> >     public var now:String = "afternoon";
> >     // Movie clip that will contain visual
> >     // elements of the hello.
> >     private var container_mc:MovieClip;
> >     //
> >     public function Hello(target:MovieClip) {
> >         container_mc = target.createEmptyMovieClip("blah", 1);
> >         placeGreeting();
> >     }
> >     private function placeGreeting() {
> >         messageFormat = new TextFormat();
> >         messageFormat.font = "Verdana";
> >         messageFormat.color = 0xffffff;
> >         messageFormat.bold = true;
> >         container_mc.createTextField("messageText", textFieldDepth,
> > 75,  100, 150, 25);
> >         container_mc.messageText.text = messageDisplay;
> >         container_mc.messageText.border = false;
> >         container_mc.messageText.setTextFormat(messageFormat);
> >     }
> >     private function displayGreeting() {
> >         if (now == "afternoon") {
> >             message = "Disco Rules";
> >         } else {
> >             message = "Samba Rules";
> >         }
> >     }
> > }
> >
> > On Jan 12, 2006, at 2:29 PM, Chris Kennon wrote:
> >
> >> Hi,
> >>
> >> In the following, I'm attempting to apply the value os an  expression
> >> in a function to a textField. A pit of quicksand has  developed.
> >> Would someone lend a hand?
> >>
> >> Respectfully,
> >> Christopher Kennon
> >> Bushidodeep.com
> >> _______________________________________________
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



--
j:pn
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to