|
Home > Archive > Macromedia Flash Server > August 2005 > SharedObject.getRemote
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SharedObject.getRemote
|
|
| W.-H.L. van Isselmuden 2005-08-14, 5:45 pm |
| Hello
on SS i have the following code
this.rooms_so = SharedObject.get("rooms", false);
this.rooms_so.setProperty("roomList", this.roomList);
is it prossible to get on the clientside connected to this SharedObject with
SharedObject.getRemote and then get the roomList?
Ik hope somebody can help me out here
Greetings Willem
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Stefan Richter 2005-08-15, 2:45 am |
| Sure (untested code):
nc = new NetConnection();
nc.connect("rtmp://server.domain.com/app");
rooms_so = SharedObject.getRemote("rooms", nc.uri, false);
rooms_so.onSync = function(list) {
trace(rooms_so.data.roomList);
// now loop over the roomList
}
rooms_so.connect(nc);
Stefan
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> W.-H.L. van Isselmuden
> Sent: Sunday, August 14, 2005 10:05 PM
> To: 'FlashComm Mailing List'
> Subject: [FlashComm] SharedObject.getRemote
>
> Hello
>
> on SS i have the following code
>
> this.rooms_so = SharedObject.get("rooms", false);
> this.rooms_so.setProperty("roomList", this.roomList);
>
>
> is it prossible to get on the clientside connected to this
> SharedObject with SharedObject.getRemote and then get the roomList?
>
> Ik hope somebody can help me out here
>
> Greetings Willem
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Naicu Octavian 2005-08-15, 7:45 am |
| The way it work is you need to catch the contents of
that shared object with the onSync handler. Every time
the so is changed that onSync handler is called with
the new data. The list variable is actualy an object
that tells why the onSync was called (addition,
modification, deletion of a slot from the so)
rooms_so.onSync =3D function(list) {
trace(rooms_so.data.roomList);
// now loop over the roomList
}
--- Stefan Richter <stefan-fMeCE+ULXElEfu+5ix1nRw@public.gmane.org> wrote:
> Sure (untested code):
>=20
> nc =3D new NetConnection();
> nc.connect("rtmp://server.domain.com/app");
> rooms_so =3D SharedObject.getRemote("rooms", nc.uri,
> false);
>=20
> rooms_so.onSync =3D function(list) {
> trace(rooms_so.data.roomList);
> // now loop over the roomList
> }
>=20
> rooms_so.connect(nc);
>=20
>=20
> Stefan
>=20
>=20
>=20
> On Behalf Of=20
> =20
> this.roomList);=20
> to this=20
> get the roomList?=20
>=20
>=20
>
=3D-----------------------------------------------------------
> Supported by Fig Leaf Software -
> http://www.figleaf.com
>
=3D-----------------------------------------------------------
>=20
> To change your subscription options or search the
> archive:
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20
________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| W.-H.L. van Isselmuden 2005-08-15, 7:45 am |
| Oke thank you Stefan and Naicu,
Now i have a following question.
I have an application named 'chat' In my main.asc
this.roomList = new Array("Room1","Room2");
Now when i start my application everything works.
But when I add a room
application.roomList.push(roomName);
application.rooms_so.setProperty("roomList", application.roomList);
The New room appears in the client everything well,
But when i connect to the new room the new room is gone.
Is there a global var or something that i can share this roomlist on
different instances?
Thnx Greetings Willem
*-----Oorspronkelijk bericht-----
*Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
*[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens Stefan Richter
*Verzonden: maandag 15 augustus 2005 9:42
*Aan: 'FlashComm Mailing List'
*Onderwerp: RE: [FlashComm] SharedObject.getRemote
*
*Sure (untested code):
*
*nc = new NetConnection();
*nc.connect("rtmp://server.domain.com/app");
*rooms_so = SharedObject.getRemote("rooms", nc.uri, false);
*
*rooms_so.onSync = function(list) {
* trace(rooms_so.data.roomList);
* // now loop over the roomList
*}
*
*rooms_so.connect(nc);
*
*
*Stefan
*
*
*
*> -----Original Message-----
*> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
*> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf
*Of W.-H.L.
*> van Isselmuden
*> Sent: Sunday, August 14, 2005 10:05 PM
*> To: 'FlashComm Mailing List'
*> Subject: [FlashComm] SharedObject.getRemote
*>
*> Hello
*>
*> on SS i have the following code
*>
*> this.rooms_so = SharedObject.get("rooms", false);
*> this.rooms_so.setProperty("roomList", this.roomList);
*>
*>
*> is it prossible to get on the clientside connected to this
*> SharedObject with SharedObject.getRemote and then get the roomList?
*>
*> Ik hope somebody can help me out here
*>
*> Greetings Willem
*
*
*=-----------------------------------------------------------
*Supported by Fig Leaf Software - http://www.figleaf.com
*=-----------------------------------------------------------
*
*To change your subscription options or search the archive:
*http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Stefan Richter 2005-08-15, 7:45 am |
| Hehe now it's getting tricky.
For instance to instance updates you got the following choices:
- serverside instance to instance connections to send updates about room
stats
- use serverside proxy shared objects
Both options are not trivial to implement if you're new to FCS. Proxy SO's
also require a serverside netconnection.
I recommend this book
http://www.amazon.co.uk/exec/obidos...-20&path=ASIN/0
596005040/qid=1109841551/ref=sr_8_xs_ap_i1_xgl/#product-details
It covers a lobby/room application in great detail. I am currently working
on a similar app which achieves the same thing using proxy SO's. I don't
find it easy, especially handling the initial connection which kickstarts a
room instance is a bit of a b*tch... But your app may be less complex.
Stefan
> -----Original Message-----
> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of
> W.-H.L. van Isselmuden
> Sent: Monday, August 15, 2005 9:38 AM
> To: 'FlashComm Mailing List'
> Subject: RE: [FlashComm] SharedObject.getRemote
>
> Oke thank you Stefan and Naicu,
>
> Now i have a following question.
>
> I have an application named 'chat' In my main.asc
> this.roomList = new Array("Room1","Room2");
>
> Now when i start my application everything works.
> But when I add a room
>
> application.roomList.push(roomName);
> application.rooms_so.setProperty("roomList", application.roomList);
>
> The New room appears in the client everything well, But when
> i connect to the new room the new room is gone.
> Is there a global var or something that i can share this
> roomlist on different instances?
>
> Thnx Greetings Willem
>
>
>
>
> *-----Oorspronkelijk bericht-----
> *Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> *[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens
> Stefan Richter
> *Verzonden: maandag 15 augustus 2005 9:42
> *Aan: 'FlashComm Mailing List'
> *Onderwerp: RE: [FlashComm] SharedObject.getRemote
> *
> *Sure (untested code):
> *
> *nc = new NetConnection();
> *nc.connect("rtmp://server.domain.com/app");
> *rooms_so = SharedObject.getRemote("rooms", nc.uri, false);
> *
> *rooms_so.onSync = function(list) {
> * trace(rooms_so.data.roomList);
> * // now loop over the roomList
> *}
> *
> *rooms_so.connect(nc);
> *
> *
> *Stefan
> *
> *
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| W.-H.L. van Isselmuden 2005-08-15, 7:45 am |
| I already have it ;-)
But i was hoping i could make it from the app i already made.
Greetins Willem
*-----Oorspronkelijk bericht-----
*Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
*[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens Stefan Richter
*Verzonden: maandag 15 augustus 2005 11:03
*Aan: 'FlashComm Mailing List'
*Onderwerp: RE: [FlashComm] SharedObject.getRemote
*
*Hehe now it's getting tricky.
*
*For instance to instance updates you got the following choices:
*
*- serverside instance to instance connections to send updates
*about room stats
*- use serverside proxy shared objects
*
*Both options are not trivial to implement if you're new to
*FCS. Proxy SO's also require a serverside netconnection.
*
*I recommend this book
*http://www.amazon.co.uk/exec/obidos...=flashcomguru-2
*0&path=ASIN/0
*596005040/qid=1109841551/ref=sr_8_xs_ap_i1_xgl/#product-details
*
*It covers a lobby/room application in great detail. I am
*currently working on a similar app which achieves the same
*thing using proxy SO's. I don't find it easy, especially
*handling the initial connection which kickstarts a room
*instance is a bit of a b*tch... But your app may be less complex.
*
*Stefan
*
*
*
*
*> -----Original Message-----
*> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
*> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf
*Of W.-H.L.
*> van Isselmuden
*> Sent: Monday, August 15, 2005 9:38 AM
*> To: 'FlashComm Mailing List'
*> Subject: RE: [FlashComm] SharedObject.getRemote
*>
*> Oke thank you Stefan and Naicu,
*>
*> Now i have a following question.
*>
*> I have an application named 'chat' In my main.asc
*this.roomList = new
*> Array("Room1","Room2");
*>
*> Now when i start my application everything works.
*> But when I add a room
*>
*> application.roomList.push(roomName);
*> application.rooms_so.setProperty("roomList", application.roomList);
*>
*> The New room appears in the client everything well, But when
*i connect
*> to the new room the new room is gone.
*> Is there a global var or something that i can share this roomlist on
*> different instances?
*>
*> Thnx Greetings Willem
*>
*>
*>
*>
*> *-----Oorspronkelijk bericht-----
*> *Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
*> *[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens Stefan
*> Richter
*> *Verzonden: maandag 15 augustus 2005 9:42
*> *Aan: 'FlashComm Mailing List'
*> *Onderwerp: RE: [FlashComm] SharedObject.getRemote
*> *
*> *Sure (untested code):
*> *
*> *nc = new NetConnection();
*> *nc.connect("rtmp://server.domain.com/app");
*> *rooms_so = SharedObject.getRemote("rooms", nc.uri, false);
*> *
*> *rooms_so.onSync = function(list) {
*> * trace(rooms_so.data.roomList);
*> * // now loop over the roomList
*> *}
*> *
*> *rooms_so.connect(nc);
*> *
*> *
*> *Stefan
*> *
*> *
*
*
*=-----------------------------------------------------------
*Supported by Fig Leaf Software - http://www.figleaf.com
*=-----------------------------------------------------------
*
*To change your subscription options or search the archive:
*http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
|
| I have been writting a whiteboard room application that handles this using=
=20
two net connections.
Needed an admin to be able to move users around rooms to be able to run an=
=20
online tutorial session. Still designing it but heres the gist of it:
Have a main lobby where admins register rooms
rtmp://mainlobby/
connected via main_nc
has a userlist_so which has username and which roominstance they are in
And have secondary room instances
rtmp://mainlobby/room1
rtmp://mainlobby/room2
rtmp://mainlobby/room3
connected via room_nc
The admin is the only person that is visible to the movieclip that can shif=
t=20
users around but all users have access. (security issue here but not that=
=20
big a deal for my app).=20
Only the userlist_so in the main lobby is used to move users around.
It is a easy workaround but you will have two netconnections per user.
admin calls moveUser(Usename, AppInstance) to a particular user and then=20
they connect themselves to that room using room_nc.
Puji
On 8/15/05, W.-H.L. van Isselmuden <isselmuden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> I already have it ;-)
>=20
> But i was hoping i could make it from the app i already made.
>=20
> Greetins Willem
>=20
> *-----Oorspronkelijk bericht-----
> *Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> *[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens Stefan Richter
> *Verzonden: maandag 15 augustus 2005 11:03
> *Aan: 'FlashComm Mailing List'
> *Onderwerp: RE: [FlashComm] SharedObject.getRemote
> *
> *Hehe now it's getting tricky.
> *
> *For instance to instance updates you got the following choices:
> *
> *- serverside instance to instance connections to send updates
> *about room stats
> *- use serverside proxy shared objects
> *
> *Both options are not trivial to implement if you're new to
> *FCS. Proxy SO's also require a serverside netconnection.
> *
> *I recommend this book
> *http://www.amazon.co.uk/exec/obidos...Dflashcomguru-2
> *0&path=3DASIN/0
> *596005040/qid=3D1109841551/ref=3Dsr_8_xs_ap_i1_xgl/#product-details
> *
> *It covers a lobby/room application in great detail. I am
> *currently working on a similar app which achieves the same
> *thing using proxy SO's. I don't find it easy, especially
> *handling the initial connection which kickstarts a room
> *instance is a bit of a b*tch... But your app may be less complex.
> *
> *Stefan
> *
> *
> *
> *
> *> -----Original Message-----
> *> From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> *> [mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf
> *Of W.-H.L.
> *> van Isselmuden
> *> Sent: Monday, August 15, 2005 9:38 AM
> *> To: 'FlashComm Mailing List'
> *> Subject: RE: [FlashComm] SharedObject.getRemote
> *>
> *> Oke thank you Stefan and Naicu,
> *>
> *> Now i have a following question.
> *>
> *> I have an application named 'chat' In my main.asc
> *this.roomList =3D new
> *> Array("Room1","Room2");
> *>
> *> Now when i start my application everything works.
> *> But when I add a room
> *>
> *> application.roomList.push(roomName);
> *> application.rooms_so.setProperty("roomList", application.roomList);
> *>
> *> The New room appears in the client everything well, But when
> *i connect
> *> to the new room the new room is gone.
> *> Is there a global var or something that i can share this roomlist on
> *> different instances?
> *>
> *> Thnx Greetings Willem
> *>
> *>
> *>
> *>
> *> *-----Oorspronkelijk bericht-----
> *> *Van: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
> *> *[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] Namens Stefan
> *> Richter
> *> *Verzonden: maandag 15 augustus 2005 9:42
> *> *Aan: 'FlashComm Mailing List'
> *> *Onderwerp: RE: [FlashComm] SharedObject.getRemote
> *> *
> *> *Sure (untested code):
> *> *
> *> *nc =3D new NetConnection();
> *> *nc.connect("rtmp://server.domain.com/app");
> *> *rooms_so =3D SharedObject.getRemote("rooms", nc.uri, false);
> *> *
> *> *rooms_so.onSync =3D function(list) {
> *> * trace(rooms_so.data.roomList);
> *> * // now loop over the roomList
> *> *}
> *> *
> *> *rooms_so.connect(nc);
> *> *
> *> *
> *> *Stefan
> *> *
> *> *
> *
> *
> *=3D-----------------------------------------------------------
> *Supported by Fig Leaf Software - http://www.figleaf.com
> *=3D-----------------------------------------------------------
> *
> *To change your subscription options or search the archive:
> *http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20
>=20
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>=20
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>=20
--=20
aapne app nirangan soyi
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|