From ffdd1a336dc5fd6861e435c388d9fac620e5e4f5 Mon Sep 17 00:00:00 2001 From: "@deniszgonjanin" Date: Sat, 12 Feb 2011 03:24:55 -0500 Subject: [PATCH] Changed the Example module to work with the new RTMPAdapter prototype --- .../modules/example/ExampleChatProxy.as | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/example/ExampleChatProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/example/ExampleChatProxy.as index 22b644f3c5..004c63b7ed 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/example/ExampleChatProxy.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/example/ExampleChatProxy.as @@ -20,9 +20,10 @@ package org.bigbluebutton.modules.example { import flash.events.NetStatusEvent; import flash.net.NetConnection; + import flash.net.Responder; import flash.net.SharedObject; - import mx.controls.Alert; + import mx.controls.Alert; public class ExampleChatProxy { @@ -42,7 +43,7 @@ package org.bigbluebutton.modules.example extractAttributes(attributes); - simpleChatSO = SharedObject.getRemote("simpleChatSO", url, false); + simpleChatSO = SharedObject.getRemote("simpleChat", url, false); simpleChatSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusEventHandler); simpleChatSO.client = this; simpleChatSO.connect(connection); @@ -60,8 +61,23 @@ package org.bigbluebutton.modules.example Alert.show(event.info.status); } + //public function sendMessage(message:String):void{ + // simpleChatSO.send("serverCallback", message); + //} + public function sendMessage(message:String):void{ - simpleChatSO.send("serverCallback", message); + connection.call("rtmpadapter.sendData", new Responder( + function(result:Object):void{ + //window.displayNewMessage(result as String); + }, + function(status:Object):void{ + window.displayNewMessage("Call failed"); + }), + "simpleChat", "testMethod", message) + } + + public function testMethod(data:String):void{ + window.displayNewMessage(data); } public function serverCallback(message:String):void{