-
Hi, I would like to know whether we can declare a sharedObject dynamically. I mean something like the following:
var history = eval("_root." + userName).data.history;
if (history == undefined || history == null) {
newSharedObj = eval("_root." + newUserName);
newSharedObj = SharedObject.getRemote(shObjName,false);
newSharedObj.connect(_root.client_nc);
}
The basic idea is to create a sharedObject on the fly and connect it.
Hope somebody out there can help me.
Thanks in advance.
Vinod Sharma
vinod@vsplash.com
[Edited by Vinod Sharma on 09-03-2002 at 09:27 AM]
-
You definitely can. I'm not sure where the error is in your code, but try something like so:
Code:
main_nc = new netConnection();
main_nc.connect("rtmp://myserver.com/my_app");
my_so = SharedObject.getRemote(varname, main_nc.uri, false);
my_so.connect(main_nc);
Psx
-
Hi Psx,
Sorry for being late on the acknowledgement...thanks all the same for the help.
I am working on a private chat app and am presently stuck with the following issue.
How to save and retrieve the private chat history of, lets say, userA, with userB, userA with userC, etc...
What I want is that, suppose I connect as userA and then chose userB or userC (who are already connected), for private chat, then, my chat history with that particular user should come up, if present.
I am dynamically creating and connecting sharedObjects whenever I chose a user for private chat, (thanks to Psx), but I am unable to connect to them on the server-side (main.asc)?
Am I on the right track? Nothing seems to be working...
Hope you and/or others out there can help me soon.
Thanks in advance.
Vinod
-
Hi..I have been able to workaround that issue by using local shared objects. There could possibly be a better solution than mine..buts its working all the same.
Thanks
-
i would like to contribute for that Private Chat. if you are interested drop a mail to me. me_at_arckid_dot_com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|