Flex: Result event multiple times

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-05-01T10:16:06Z Indexed on 2010/05/01 10:37 UTC
Read the original article Hit count: 428

Filed under:
|

Hello everybody!!

I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1

This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code?

Tom

protected function tryLogin():void {
                encryptStringResult.addEventListener('result', function(event:ResultEvent):void {
                    var encryptString:String = event.result.toString();
                    Alert.show('Done');
                });
                encryptStringResult.token = auth.getEncryptString();
            }

© Stack Overflow or respective owner

Related posts about flex

Related posts about events