Hi,
It did work for me. Can you share your code... I pasted the code I used to test...
It would be undefined the first time you run. Click on the button to set some value. Close the app, and run the second time, and I see the sharedProperty value on just subscribing.
Thanks
Arun
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:rtc="http://ns.adobe.com/rtc" xmlns:authentication="com.adobe.rtc.authentication.*" xmlns:session="com.adobe.rtc.session.*" xmlns:collaboration="com.adobe.rtc.collaboration.*">
<mx:Script>
<![CDATA[
import com.adobe.rtc.events.CollectionNodeEvent;
import com.adobe.rtc.events.SharedPropertyEvent;
import com.adobe.rtc.sharedModel.SharedProperty;
import flashx.textLayout.tlf_internal;
import mx.controls.Alert;
import mx.events.FlexEvent;
[Bindable]
protected var _sharedProperty:SharedProperty ;
protected function cSession_creationCompleteHandler(event:Event):void
{
if (cSession.isSynchronized) {
_sharedProperty = new SharedProperty();
_sharedProperty.sharedID = "sProp" ;
_sharedProperty.connectSession = cSession ;
_sharedProperty.addEventListener(SharedPropertyEvent.CHANGE,onChange);
_sharedProperty.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSyncChange);
_sharedProperty.subscribe();
}
}
protected function startBtn_clickHandler(event:Event):void
{
// TODO Auto-generated method stub
Alert.show(sPText.text);
trace("Settinga random value");
_sharedProperty.value = (Math.random()*1000).toString();
}
protected function onChange(p_evt:SharedPropertyEvent):void
{
if (sPText) {
sPText.text += p_evt.value;
}
}
protected function onSyncChange(p_evt:CollectionNodeEvent):void
{
if (sPText) {
sPText.text += _sharedProperty.value;
}
}
]]>
</mx:Script>
<!--
You would likely use external authentication here for a deployed application;
you would certainly not hard code Adobe IDs here.
-->
<authentication:AdobeHSAuthenticator
id="auth"
userName="xyz@xyz.com"
password=""
/>
<session:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%" roomURL="https://collaboration.adobelivecycle.com/uName/roomName" creationComplete="cSession_creationCompleteHandler(event)">
<mx:VBox width="100%" height="100%">
<mx:Button id="startBtn" label="Get value" click="startBtn_clickHandler(event)" height="20" enabled="{_sharedProperty.isSynchronized}"/>
<mx:Label text="SharedProp Value" id="sPText" />
</mx:VBox>
</session:ConnectSessionContainer>
</mx:Application>