How to make app run from specific path only?

46 Views Asked by At

How to make the program not work through DVD and work only through the HDD?
With a condition if it's in a different drive other than C: then it does not work.

My code attempt:

stop();
import flash.filesystem.*;

var file: File = File.documentsDirectory;
var file2: File = File.documentsDirectory;

if (file.nativePath.indexOf("C:\Town\9.swf") != 0) 
{
    while (true) stage.removeChildAt(0);
    gotoAndPlay(15);

} 
else if (file2.nativePath.indexOf("D:\Town\9.swf") != 0)
{
    while (true) stage.removeChildAt(0); 
    
    fscommand("quit");

}
0

There are 0 best solutions below