What is the principle of more than 3 characters(movieclip)' meeting in cirrus(netstream)?
Hi.I'm JHS(Jeong Hyeon Seong).And I'd like to realize the program that can realize more than 3 characters meeting.
This is part of my source code of My fla,which is using cirrus.And which is able to chat more than 3 people,but cannot working for 3 characters(movieclip)' meeting
_sendstream.send('recvprot_chainfo',{ID:inum , xpos:u.x , ypos:u.y , xscale:u.scaleX , mapname:currentFrame , chacurf:u.currentFrame});
//u is my movieclip
//sendstream code,which is for sending the character's position,and xscale,and mapname(variable for preventing meeting for between another frame(field)'s character And current frame's I.),and character's currentframe(to realize character's various moving).
function pushrecvstream_f(newpeerid:String):void
{
//수신관련 함수
for (i=0; i<_recvstreamarray.length; i += 1)
{
if (_recvstreamarray.farID == newpeerid)
{
return;
}
}
var _newrecvstream:NetStream = new NetStream(_netconnection,newpeerid);
_newrecvstream.addEventListener(NetStatusEvent.NET_STATUS,netstatus_f);
var obj = new Object();
obj.recvprot_msg = function(e)
{
msgsplus_f(e)
};
//chat receive function
obj.recvprot_nick = function(e)
{
for(i=0;i<_userarray.length;i+=1){
if(_userarray == e)
{
return;
}
}
//chat receive function 2
_userarray.push(e as String);
msgsplus_f('추가');
ulists.appendText(_userarray[_userarray.length-1]+'\n');
_sendstream.send('recvprot_nick',nam.text)
};
obj.recvprot_delete = function(e)
{
for(i=0;i<_userarray.length;i+=1)
{
if(e as String == _userarray)
{
msgsplus_f(_userarray+'사용자님이 접속을 종료하셨습니다.');
_userarray.splice(i,1)
break;
}
}
ulists.text = _userarray[0];
for(i=1;i<_userarray.length;i+=1)
{
ulists.appendText(_userarray+'\n');
}
};
obj.recvprot_chainfo = function(e)
{
for(i=0;i<_userarray.length;i+=1){
if(_userarray == e)
{
return;
}
}
if (e.ID != _netconnection.nearID)
{
if(currentFrame == e.mapname)
{
addChildAt(c,inum);
c.x = e.xpos
c.y = e.ypos
c.scaleX = e.xscale
c.gotoAndStop(e.chacurf);
return;
}
else {removeChild(c);}
}
};
//character's creating and moving code(This is most important code).
_newrecvstream.client = obj;
_newrecvstream.play(_groupname);
_recvstreamarray.push(_newrecvstream);
}
In this code,what can I do for more than 3 charater's meeting and moving?
When this problem got solved,I have no question for this part anymore.
Any help will be appreciated.Thank you.
