Hi,
I am attempting to do some custom messaging by using the CollectionNode in action script. When I am logged in as host I can use the collectionNode with no problems, but when I am logged in as a guest (all my users will be 'guests') - I get the error 'insufficient permissions to create a new CollectionNode. You must be an OWNER of the room to add new multi-user features to it. Log in with developer credentials in order to do so.'
I think the problem is that in my code I have:
private var messaging:CollectionNode = new CollectionNode();
I have a CollectionNode ( named 'Messaging') for my room, which was created using the room console. Is there a way I can access this already created CollectionNode through actionscript (jnstead of instantiating a new one)?
Hope my question makes sense - I am really stuck and probably missing something obvious. Can anyone help me out?
thanks
Mark
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Mark,
Here is a way to access a collectionnode created using devconsole.
For e.g. Let's say you created a CollectionNode called "myCollectionNode" using devconsole, then the way you can access it as a guest is
private var messaging:CollectionNode = new CollectionNode();
messaging.sharedID = "myCollectionNode" ;
messaging.connectSession = session ;
messaging.subscribe() ;
i.e. you need to assign the name to sharedID property and assign a connectSession object to connectSession property. And then when you call subscribe, you get all the data.
Hope this helps.
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi Mark,
Here is a way to access a collectionnode created using devconsole.
For e.g. Let's say you created a CollectionNode called "myCollectionNode" using devconsole, then the way you can access it as a guest is
private var messaging:CollectionNode = new CollectionNode();
messaging.sharedID = "myCollectionNode" ;
messaging.connectSession = session ;
messaging.subscribe() ;
i.e. you need to assign the name to sharedID property and assign a connectSession object to connectSession property. And then when you call subscribe, you get all the data.
Hope this helps.
Thanks
Hironmay Basu
Views
Replies
Total Likes
Hi Hironmay,
Thanks that did help! The issue was that I was not setting the sharedID of the CollectionNode. It makes sense now that it should be set to the name of the CollectionNode I created in the dev console.
cheers
Mark
Views
Replies
Total Likes