GetRemote, why it doesnt work in AS3?

Hi i have tried this code on AS3:

var nc:NetConnection = new NetConnection(); 
nc.connect("rtmp://localhost/SOSample"); 
var so:SharedObject = SharedObject.getRemote("Chat", nc.uri);  
so.connect(nc); 

function sendMessage():void{     
    history.appendText(so.data.chatMessage + "
"); 
    so.data.chatMessage = message.text; 
    } 
sendMessage();}

It is weird becouse if i convert the code in AS2 it works, but in AS3 it seems like the getremote doesnt send message to the server, so 2 clients can not comunicate.
I tried this with RED5 but i think with FMS would be the same. Someone knows why?