-
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;
or
_root.entries_so.data[pictureID] = null;
or
delete _root.entries_so.data[pictureID];
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);
main.asc code:
Client.prototype.delEntry = function(removeNum)
{
var slideId = this.entries_so.getProperty("removeNum")
this.entries_so.setProperty("title"+slideId, null);
}
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.
-
Hey -
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.
http://www.actionscripts.org/tutoria...ts/index.shtml
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!
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
|