Well the suggestion was just a quick one using binding. The other way if you wanted to format the string would be to use the change event on the text field to trigger a function.
So this (again I haven't got FlexBuilder here, so treat this as pseudocode) <mx:Script> <[CDATA] (Does CDATA look like that? Dunno never typed it ;) )> private function formatName():void { var formattedString:String = //whatever code you need to do the formatting. } outputLabel.text = "Welcome to the app " +formattedString; </[CDATA]> </mx:Script> <mx:Label id="outputLabel"/> <mx:TextInput id="inputText" change="formatName()"/> But depending on what your username is, the binding is a bit less code. > if your username is [EMAIL PROTECTED] then the welcome message > will say > > "Welcome to the app [EMAIL PROTECTED]" > > which is somewhat impersonal. If there are first and last name > properties of the user then it may be friendlier to use those, not to > mention it then serves as a visual cue that the login worked. > > But you are right, you could just bind whatever they type into the > username field to a label saying hello. > > --- In flexcoders@yahoogroups.com, "Tim Ashworth" <[EMAIL PROTECTED]> wrote: >> >> This way would work, but may not be what you want. P.S. I haven't had a >> chance to check this as I am on a different machine without Flex > Builder on >> it so treat this a pseudo code if it doesn't work. >> >> <mx:Label text="Welcome to the app {userName}"/> >> >> <mx:TextInput id="userName" text="Username"/> >> >> So initially the label will read 'Username' and afterward it will > display >> whatever they type in. >> >> This will happen before login checks. If you want to change it on > response >> then you'll need a function triggered when the data returns from the >> database. If this is what you want to do, like Tracy says - post > code pls. >> >> t >> _____ >> >> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On >> Behalf Of simonjpalmer >> Sent: 18 January 2008 17:56 >> To: flexcoders@yahoogroups.com >> Subject: [flexcoders] Re: Login Problem >> >> >> >> do they provide their login details via HTML or fields in your flex >> app? The question I am really asking is what controls the login >> transaction with the server? >> >> If it is your flex app (otherwise you should go and post on an HTML >> forum) then what about adding a result responder to your login request >> and sending back the user's name/nickname/whatever. When the response >> returns to the client and the responder runs, extract the user's name >> and update your field which says hello. I do something very similar >> in my app but I label a button with their full name which the user can >> click to set their personal preferences. It also serves to remind >> them who they are logged in as, which works very well for demos. >> >> In principle I don't see why this is any different to any other server >> request, it just happens to be login. >> >> --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> > ups.com, >> "NileAge, Mail" <mail@> wrote: >> > >> > Hi all >> > >> > I'm working with flex 2 and asp.net . I face a problem when I make >> login I >> > want to write welcome "User Name" as we see in most web sites. This >> occur >> > when I make login and then press F5 >> > >> > I need to do this without pressing F5 or after I make login > immediately >> > >> > > >