Deleting Shared Objects from server
I can update the object with the following code:
_root.entries_so.data[pictureID].title = "Updated Text";
If I do any of the following the shared object gets corrupt and I can no longer add to it.
_root.entries_so.data[pictureID].title = null;
_root.entries_so.data[pictureID] = null;
Do I need to do this server-side in the main.asc and how would I do that??
I have been trying to go server-side as I can't seem to be able to do anything from the flash piece. I tried the following:
in my flash:
// removeNum = the ID of the object
_root.main_nc.call("delEntry", null, removeNum);
Client.prototype.delEntry = function(removeNum)
var slideId = this.entries_so.getProperty("removeNum")
This seems to do nothing. So now I am looking at SharedObject.purge. I am not sure if it will work as it looks like it might remove everything up to the ID number you specify. But I will let you know soon.
I haven't gotten a chance to mess around (haven't needed to delete anything yet!) but I found this article while poking around Actionscript.org.
It's about local so's, but about 2 pages in it talks about the oddities of deleting things. I imagine most of the same applies to deleting remote so's as well.
Hope it helps!
Click Here to Expand Forum to Full Width