1 Reply Latest reply on Sep 8, 2008 7:09 AM by EvolvedDSM

    Specifying two channels in an application in Actionscript problem.

    pranu.h
      Hi All,
      Can somebody help me in specifying two channel definitions in actionscript.Here is the code that I'm trying but not getting succes,

      public var cs:ChannelSet;
      public var customChannel:Channel ;
      cs = new ChannelSet();
      customChannel = new AMFChannel("my-amf"," http://{server.name}:{server.port}/{context.root}/messagebroker/amf");
      if(cs.connected){
      cs.addChannel(customChannel);
      }else{
      customChannel = new SecureAMFChannel("my-amf","https://{server.name}:{server.port}/{context.root}
      /messagebroker/amfsecure");
      cs.addChannel(customChannel);
      }

      remoteObject.channelSet = cs;
        • 1. Re: Specifying two channels in an application in Actionscript problem.
          EvolvedDSM Level 2
          First off, be patient when submitting threads on these forums. You have 4 threads all saying the same thing and are submitted seconds after each other.

          To get to your thread, its not quite clear what you are wanting. It would be helpful if you could post more of your code to show exactly when cs is and isn't connected. It looks conflicting because you set the channel once regardless of your if-statement, and then you set it again if your cs channel isn't connected.

          I've never done channels like this. I always set up a function that sets all the channel info and call them appropriately when needed.