|
Passing FSCommand parameters |
Top Previous Next |
|
Some FSCommand requires one or many parameters and some do not. A "PlayNextItem" FSCommand does not require any parameter and simply can be executed as followed:
FSCommand("PlayNextItem", "");
While DeleteFile FSCommand requires one parameter which is the filename.
FSCommand("DeleteFile", "C:\\Data\\Test.txt");
While CopyFile FSCommand requires two parameters which is the source and destination filename. Parameter should be separated by comma.
FSCommand("CopyFile", "C:\\Data\\Test.txt,C:\\Data\\Test2.txt");
Receiving parameters value
Some FSCommand return back parameters value such as GetFileSize. Flash EXE Builder returns back parameters value via flash variables which you can nominate during the call to the FSCommand.
FSCommand("GetFileSize", "C:\\Data\\Test.dat,FileSizeVar");
This FSCommand will return the size of the file C:\Data\Test.dat into _root.FileSizeVar variable. You can simply read the value of _root.FileSizeVar within the actionscript. |