Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Easy alert for private chat


Level 1

I am having too much fun wiring up a simple private chat program with afcs.  I now have a custom roster that shows what users are online or not,  and a simple mouse click starts a SimpleChat with the user.  The only problem is that I need to send an alert to the person I am chatting with so that they know to open their chat window and start banging out a reply.  Looking for any simple solutions such as sending an annoying buzzer / displaying an annoying popup, etc.  You know the kind.   Thanks

1 Reply



One of the approaches are, You can make all the users subscribe to the SimpleChatModel and listen to the ChatEvent.HISTORY_CHANGE event. And in your event listener you could add your UI code to invoke the chat window at the receivers end.

Protected function init():void


                _model = new SimpleChatModel();

                _model.connectSession = _connectSession ;


                _model.addEventListener(CollectionNodeEvent.SYNCHRONIZATIONCHANGE, onSynchronizationChange);

                _model.addEventListener(ChatEvent.HISTORYCHANGE, onHistoryChange);


protected function onHistoryChange(p_evt:ChatEvent):void {

    //Invoke UI