Views
Replies
Total Likes
You have to write these statements in result hanlder. Coz, here you have just sent a request to server and in the next statement you are checking the result. At that time you will not get any result, actually some time will be spent to comeback from server.
princ = session.getPrincipal().lastResult as String;
lbWelcome.text = "Welcome, " + princ;
So handle everything in coll back.
<mx:RemoteObject id="Server" destination="ServerDestination" fault="faultHandler(event)">
<mx:method name="getPrincipal" result="getPrincipalHandler(event)"/>
</mx:RemoteObject>
private function
getPrincipalHandler(event:ResultEvent):void
{
princ = event.result as String;
}
Try this, and let me know your results or concerns...
Views
Replies
Total Likes