-
I am deleting items from the sample guestbook with this code:
function itemClicked(pictureID){
_root.entries_so.data[pictureID] = null;
_root.doRefresh();
}
Strange things happen such as deleting more than 1 object. Also once I delete an object this way, I can no longer add objects to the server. I have to clean out the server side data and reload the application and start fresh.
Since this doesn't work, how would I use the stream.clear() to delete and object?
I know you would put the something like the following code into main.asc
application.onConnect = function(client, id){
s = Stream.get("foo");
if (s){
s.onStatus = function(info){
if(info.code == "NetStream.Clear.Success"){
trace(info.description);
}
if(info.code == "NetStream.Clear.Failure"){
trace(info.description);
}
};
s.clear();
}
}
I have no clue if this is how I would setup up this function on the server side and I am not sure how to call it saying that I want pictureID deleted.
Any help would be greatly appreciated.
Chris
-
Hey - If you want to delete an entire so on the server-side, you can use:
sharedObject.clear();
You don't need to use any the stream stuff. Check in the docs under SharedObject for the server side.
You may be able to just do something like:
delete my_so.data[pictureID];
but I haven't tried it!
Psx
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
|