Question
File exists problem
I have some trouble with overwriteing previous streams i
recorded. My app is simple i want to record a stream and then let
the user view it. He can then record the stream again and view the
new recording. My problem is that when a recording is done i copy
it to another location (using virtual directory mapping) only when
i check for the just created recording by doing the following:
var tmp = new File("streams/instancename/recording");
if ( tmp.exists){
//copy the file
}
else{
trace("recording not found";
}
it traces that the recording is not found. Has this something to do with the fact that the recording thas was written by FMS needs more time before the file system realizes it is there? Besides that i have the problem that when i overwrite an flv file an play it, the old recording is shown and not the new one. Has this something to do with caching because the old recording does not exist any more as a file? I tried several things but i am nog getting any further so any help would be appreciated...
var tmp = new File("streams/instancename/recording");
if ( tmp.exists){
//copy the file
}
else{
trace("recording not found";
}
it traces that the recording is not found. Has this something to do with the fact that the recording thas was written by FMS needs more time before the file system realizes it is there? Besides that i have the problem that when i overwrite an flv file an play it, the old recording is shown and not the new one. Has this something to do with caching because the old recording does not exist any more as a file? I tried several things but i am nog getting any further so any help would be appreciated...
