tweakz20
08-04-2009, 08:05 PM
Hey AS.org.
I'm working on a large university sponsored project. To give a broad overview, this project involves students giving presentations in front of cameras which are broad casted live and then archived onto our FMS server for immediate viewing after class. This project should be done within 2 weeks, when classes resume.
I am stuck, as I can't figure out how to get SSAS to send back the correct directory listing.
Main.asc
application.onConnect = function( p_client)
{
....
p_client.call("dirRcv", null, getDirectory("/"));
}
function getDirectory (theDirectory) {
var currentDir = new File(theDirectory);
var a = currentDir.list(function(name){return name;});
return a;
}
Doing a trace on "a" in getDirectory shows all files with their full path.
Client class (extends NetConnection)
public function dirRcv(d:Object):void {
trace(d);
for (var a in d)
{
trace(a);
}
}
This returns:
[object Object],[object Object],[object Object]
0
1
2
Any help is appreciated.
Thanks
I'm working on a large university sponsored project. To give a broad overview, this project involves students giving presentations in front of cameras which are broad casted live and then archived onto our FMS server for immediate viewing after class. This project should be done within 2 weeks, when classes resume.
I am stuck, as I can't figure out how to get SSAS to send back the correct directory listing.
Main.asc
application.onConnect = function( p_client)
{
....
p_client.call("dirRcv", null, getDirectory("/"));
}
function getDirectory (theDirectory) {
var currentDir = new File(theDirectory);
var a = currentDir.list(function(name){return name;});
return a;
}
Doing a trace on "a" in getDirectory shows all files with their full path.
Client class (extends NetConnection)
public function dirRcv(d:Object):void {
trace(d);
for (var a in d)
{
trace(a);
}
}
This returns:
[object Object],[object Object],[object Object]
0
1
2
Any help is appreciated.
Thanks