You can programmatically create appropriate Channels at
runtime and then add them to a ChannelSet. You can then replace the
ChannelSet on the RemoteObject instance.
import mx.messaging.ChannelSet;
import mx.messaging.Channel;
import mx.messaging.channels.AMFChannel;
...
var channelSet:ChannelSet = new ChannelSet();
var channel:Channel = new AMFChannel("my-amf",
http://localhost:8700/cfusion/messagebroker/amf");channelSet.addChannel(channel);
remoteObject.channelSet = channelSet;
...
Note that when you construct a channel, such as a new
AMFChannel, you give a channel-id and an endpointURL to the
constructor. You can set the channel-id to null if you don't wish
to have the remote endpoints validate that you are contacting them
via the correct technology/type of Channel.