0 Replies Latest reply on Jun 17, 2009 12:16 PM by IlyaG

    How BlazeDS messaging working in action script

    IlyaG Level 1

      Hi guys I am trying to run the BlazeDS chat example from the next link, in action script.

      http://www.adobe.com/devnet/livecycle/articles/blazeds_gettingstarted_02.html on page 3

       

      But there seem to be some problem with my message event, I can catch it, this is what I been trying to do:

       

      private var _producer:Producer;
      private var _consumer:Consumer;

       

      function init():void

      {

      _producer=new Producer();
      _consumer=new Consumer();
      _producer.destination="Chat";
      _consumer.destination="Chat";
      _consumer.addEventListener(MessageEvent.MESSAGE,messageHandler);

      }

       

      function sendMSG():void

      {

      var message:IMessage=new AsyncMessage();
      message.body.chatMessage="This is working just fine";

      _producer.send(message);

      }

       

      function getMSG(msg:IMessage):void

      {

      Alert.show(msg.body.chatMessage);

      }