-
I want to delete recorded entries from the guestbook. I have created a delete button next to each entry but I am not sure how to hook up the button.
This piece of code reads all the data off the server:
function doRefresh() {
//trace("Refreshing panel");
_root.doCountEntries();
// look in the library for "myArray" for the code of doPopulate()
_root.myPane.getScrollContent().doPopulate();
}
The function I have started is as follows:
function doDelete() {
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 an not sure how I get the button to hold the value of the record and then seend it to the function.
Any help would be greatly appreciated!
Chris
-
Making progress
So I have added the delete button under the weblogentry symbol and named it delete_button that calls the function doDelete.
Now i just have to figure out how I get that button to hold the number of the item I want to delete within the delete button function.
Any suggestions?
Chris
-
I don't think clear works from the client end. You'll have to set it up on the server-side, and then call it from there?
psx
-
Server Side
Do you have any idea how I would call that function on the server?
Chris
-
Deleting an item off the Flashcom server
Here is code I pulled out of the sample panel presentation which deletes slides off the server. Is this calling a server-side script, or doing it directly? Because I want to just have flash ask the server to delete and item directly.
// Sends a call to the server to remove a slide
FCTextPresentationClass.prototype.deleteSlide = function() {
if (this.speakerMode) {
this.nc.call(this.prefix + "deleteSlide", null);
}
};
-
That code is calling a "deleteSlide" method on the server. You may be able to do something like:
this.nc.call(this.prefix + "clear", null);
but I have no idea if it will work. I seem to doubt it, as I think the only methods you can call are those defined on the server side. Actually a nice feature , that the client can't delete a stream without asking the server to do 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
|