All AS code needs to be inside the curly braces and you need to concatenate your static string to the string returned from your function
<mx:Text text="{returnEmail() + ' is logged on'}" /> On Fri, Jul 11, 2008 at 7:06 PM, Scott <[EMAIL PROTECTED]> wrote: > I'm working on a logon class in Flex 3. I've got a login.mxml which > controls the overall views (logon/register/logout) all in the same box > depending on what state the user is in. > > > > In the loginForm.mxml (included in the logon.mxml), I've got a function > called protected returnName():String > > > > > > Function I want to call from the loginForm AS3 script: > > *protected* *function* returnName():String (I've also tried public in > case it was not available in that area of code) > > { > > *return* *this*.username.text; > > } > > > > Snippet from my mxml code: > > Xmlns:login="com.ft.views.login.*"; > > > > ... > > > > <mx:State name="loggedIn"> > > > > <mx:AddChild position="lastChild"> > > > > <mx:Panel > > width="75%" height="50%" layout="vertical" > > verticalScrollPolicy="off" horizontalScrollPolicy="off"> > > > > <mx:VBox width="100%" height="100%" verticalScrollPolicy="off" > horizontalScrollPolicy="off"> > > <mx:Text text="{returnEmail()} is logged on;" /> ß------- line in > question -------- > > <login:LogoutForm > > logoutSuccessful="this.currentState='onLogin()';" /> > > </mx:VBox> > > </mx:Panel> > > > > </mx:AddChild> > > </mx:State> > > > > I can't seem to figure out how to reference the method as I get the error: > 1180: Call to a possibly undefined method returnName. > > > > I've tried: > > <mx:Text text="{loginForm.returnEmail()} is logged on;" /> > > <mx:Text text="{login.returnEmail()} is logged on;" /> > > Among many others… > > > > This is probably pretty simple. I really appreciate your help. > >