在使用FMS开发共享对象时需要注意,只有使用Flash Media Interactive Server或Flash Media Development Server这两个版本时才能够创建和使用远程共享对象,来实现多客户端的应用程序之间共享数据。如果是使用的Flash Media Streaming Server版FMS是不能创建远程共享对象的,只能创建本地共享对象,类似于传统Web开发中的Cookie。
private function onSend():void { var tempCollection:ArrayCollection =new ArrayCollection(); if(so.data.msgCollection !=null) { convertArrayCollection(tempCollection,so.data.msgCollection as ArrayCollection); }
private function onSyncHandler(evt:SyncEvent):void { if(so.data.msgCollection!=null) { var tempCollection:ArrayCollection =new ArrayCollection(); convertArrayCollection(tempCollection,so.data.msgCollection as ArrayCollection);
this.msgText.text=""; for(var index:int=0;index<tempCollection.length;index++) { var message:Object = tempCollection.getItemAt(index); var displayMessage:String = message.NickName+"说:"+message.Context; this.msgText.text += displayMessage +"\n"; } } }
private function onSyncHandler(evt:SyncEvent):void { if(so.data.msgCollection!=null) { var tempCollection:ArrayCollection =new ArrayCollection(); convertArrayCollection(tempCollection,so.data.msgCollection as ArrayCollection);
this.msgText.text=""; for(var index:int=0;index<tempCollection.length;index++) { var message:Object = tempCollection.getItemAt(index); var displayMessage:String = message.NickName+"说:"+message.Context; this.msgText.text += displayMessage +"\n"; } } }
private function onSend():void { var tempCollection:ArrayCollection =new ArrayCollection(); if(so.data.msgCollection !=null) { convertArrayCollection(tempCollection,so.data.msgCollection as ArrayCollection); }
今天和同事争论一问题,关于静态变量与非静态变量的初始化顺序,谁先谁后,最终想整理出来!测试代码:
import java.util.Map;
public class T {
public static T t = new T();
private Map map = new HashMap();
public T(){
System.out.println(&quo
完整命令
CREATE DATABASE mynewdb USER SYS IDENTIFIED BY sys_password USER SYSTEM IDENTIFIED BY system_password LOGFILE GROUP 1 ('/u01/logs/my/redo01a.log','/u02/logs/m
多线程并发使用同一个channel
java.nio.BufferOverflowException: null
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183) ~[na:1.7.0_60-ea]
at java.nio.ByteBuffer.put(ByteBuffer.java:832) ~[na:1.7.0_60-ea]