Page 1 of 1

as2 avchat returning error

Posted: 22 Feb 2010, 08:26
by laysz
Hi,

The RedBox AS2 API require an instance of the SmartFoxBits Connector to work properly.

I am trying to implement a web cam into the tic tac toe game but what if I do not want to use the mc_connector. Can I sitll use the AVChatManager? If I can't use this, what is the easiest way I can set up a web cam between two people. With the sftrix (tic toe) example, the two people joined a room and it's assumed that they want to set up web cam chat.

The failure occurs when I call this. I noticed in the .as examples it does this as well but I don't see it use the mc_connector:

function initializeAV():Void
{

// Create AVChatmanager instance
avChatMan = new AVChatManager(smartfox, red5IpAddress, true)

avChatMan.addEventListener(RedBoxChatEvent.onAVConnectionInited, onAVConnectionInited)
avChatMan.addEventListener(RedBoxChatEvent.onAVConnectionError, onAVConnectionError)
avChatMan.addEventListener(RedBoxChatEvent.onChatRequest, onChatRequest)
avChatMan.addEventListener(RedBoxChatEvent.onChatRefused, onChatRefused)
avChatMan.addEventListener(RedBoxChatEvent.onChatStarted, onChatStarted)
avChatMan.addEventListener(RedBoxChatEvent.onChatStopped, onChatStopped)

inited = true
}

Please help,

Thanks in advance!

One more thing

Posted: 22 Feb 2010, 08:43
by laysz
This is what I use to connect to SF server instead of the mc_connector. The .AS example does not use the mc_connector as well.

var ip:String = "127.0.0.1" //"99.244.61.79"
var port:Number = 9339
var zone:String = "sftris"

var smartfox:SmartFoxClient = new SmartFoxClient()
smartfox.onConnection = handleConnection
smartfox.debug = true

// Connect to the server
smartfox.connect(ip, port)

Posted: 24 Feb 2010, 15:25
by Bax
The RedBox is supposed to use the SmartFoxBits connector. If you don't want to use it, you should modify the RedBox classes source code to change its behavior.