Home > Actionscript, FLEX, WEBORB > FLEX : Creating RemoteObject Channel Set for WEBORB or LCDS in ActionScript

FLEX : Creating RemoteObject Channel Set for WEBORB or LCDS in ActionScript

March 2nd, 2009

I have been having some issues when running multiple WebOrb instances (usually because of a different authentication scheme) where if I start using one destination and then switch to another, my SWF gets confused, and dose no know which remote instance to get execute the remote object at.

To combat the issue, i started hard coding my channel information for each instance, and I honestly like it more. I no longer need to clean my projects every time I make a change, and I always know where my .swf is pointing.

Like it or leave it, here is how its done.

import mx.rpc.remoting.RemoteObject;
import mx.messaging.Channel;
import mx.messaging.ChannelSet;
import mx.messaging.channels.AMFChannel;

    private function init() : void {
        remoteObject  = new RemoteObject("GenericDestination");
        var cs:ChannelSet = new ChannelSet();
        var customChannel:Channel = new AMFChannel("my-channel", "http://myurl:80/WebOrbK/weborb.aspx");
        cs.addChannel(customChannel);
        remoteObject.channelSet = cs;
        remoteObject.destination = "my-destination";
        remoteObject.source = "MyNameSpace.MyClass";

        //Probably would add remote object listeners here.
        }

Greg Actionscript, FLEX, WEBORB

  1. March 20th, 2009 at 10:34 | #1

    Hi Greg,
    I was looking for ActionScript syntax for RemoteObject and channel defination so this code helped me. Thanks!

  2. March 20th, 2009 at 11:50 | #2

    Glad I could Help Trevor

  3. suhas koley
    March 26th, 2009 at 13:56 | #3

    Hi Friend,

    Thanks in advance .
    It helps me a lot

  1. No trackbacks yet.