[Question][CS5] Using .send() and a few other questions


hi guys on past few days i've been researching stratus in cs5 in hope able spawn sort of multiplayer game it. main problem have run using .send(), can't figure out how use correctly. understood work not seem register has happened:

 

var mystring:string;

function sendmsg (event:mouseevent):void
{
     mystring = textinput.text;
     outgoingstream.send("msg", mystring);
}

 

function msg (mymsg:string):void

{

     mylog.text += mymsg;

}

 

any getting work appreciated.

 

just few small questions stratus love answered:

  1. is using .send() faster/more efficent posting fraction of second counts (sending player positions) there 4-8 people?
  2. when using netstream groupspecifier attached how can tell when person has joined or left?

 

note: questions in regard cs5, not flash builder i'm not aware if there differences in coding.

netstream.send() should faster netgroup.post(), when using 1:1 netstreams (vs group netstreams).

 

when groups large, there's no passive way tell when members join or leave.  however, small groups (less 15 members), "fully meshed", meaning every member has direct connection every other member.  when that's case, can see netgroup.neighbor.connect/disconnect events on netgroup.  receive those, must create netgroup same groupspec netstream , listen netstatusevent.net_status events.

 

your function "msg" must method on subscribing netstream's "client" object receive netstream.send()s publisher.

 

this generic actionscript stuff.  don't know how use flash cs5 stuff should same in flash , flash builder.

 

-mike



More discussions in Cirrus


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support