:confused;
Hello all,
I'm having a trouble of calling the server side to delete the selected file
from a list box. here is what I have on the server side (main.asc):
application.onConnect = function(newClient, name){
newClient.name=name;
application.acceptConnection(newClient);
var msg = "Hello! You are connected as: " + newClient.name;
newClient.call("msgFromSrvr", false, msg);
newClient.delFromSrvr = function(s){
var s = Stream.get(tempPlayFile);
trace("you selected " + s);
if(s){
s.onStatus = function(info){
if(info.code == "NetStream.Clear.Success"){
trace("Stream cleared successfully." + tempPlayFile);
}
if(info.code == "NetStream.Clear.Failed"){
trace("Failed to clear stream" + tempPlayFile);
}
};
s.clear();
}
}
}
===================
and on the FLA file after clicking the delete button:
function doDelete(){
var playFile = _global.selectedFile;
if(_global.selectedFile == undefined){
trace("select file to delete");
}else{
audio_lb.removeItemAt(audio_lb.selectedIndex);
nc.delFromSrvr = function(tempPlayFile){
var tempPlayFile:String;
var s;
_global.selectedFile = tempPlayFile;
tempPlayFile = s;
}
}
}