|
-
December 15th, 2009, 09:05 AM
#3
Re: Issue with scope
There's not much to it. Most of it I got from the samples
public class AmfConnect
{
public AmfConnect(ArrayList args)
{
ServerConnect(args);
}
private void ServerConnect(ArrayList args)
{
//get args from array list
string server = args[0].ToString();
string command = args[1].ToString();
string file = args[2].ToString();
// Create NetConnection client
NetConnection connection;
connection = new NetConnection();
connection.ObjectEncoding = ObjectEncoding.AMF3;
//connection.NetStatus += new NetStatusHandler(_netConnection_NetStatus);
//This is an example of a good connection
//connection.Connect("http://c.brightcove.com/services/messagebroker/amf");
connection.Connect(server);
//This is an example of a good call
//connection.Call("com.brightcove.player.runtime.PlayerMediaFacade.findMediaById", new AmfResult(), new object[] { 5.3500013001E10, 103207, true, null, 1.859671316E9 });
connection.Call(command, new AmfResult() , new object[] { file, 103207, true, null, 1.859671316E9 });
}
}
public class AmfResult : IPendingServiceCallback
{
object result;
public void ResultReceived(IPendingServiceCall call)
{
result = call.Result;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|