public IoBuffer encodeFlexMessage(FlexMessage msg,RTMP rtmp){
  IoBuffer out=IoBuffer.allocate(1024);
  out.setAutoExpand(true);
  out.put((byte)0);
  encodeNotifyOrInvoke(out,msg,rtmp);
  return out;
}

public IoBuffer encodeFlexMessage ( FlexMessage msg , RTMP rtmp ) { IoBuffer out = IoBuffer . allocate ( 1024 ) ; out . setAutoExpand ( true ) ; out . put ( ( byte ) 0 ) ; encodeNotifyOrInvoke ( out , msg , rtmp ) ; return out ; }
encodes flex message event .
