Skip to content

Instantly share code, notes, and snippets.

@peterblazejewicz
Created April 28, 2011 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterblazejewicz/946107 to your computer and use it in GitHub Desktop.
Save peterblazejewicz/946107 to your computer and use it in GitHub Desktop.
helper to compute paths
/**
* this method help to construct paths
* at runtime and will work during authoring
* and in ZINC application and on Win/Mac/Linux
*/
public function getPath(path:String):String
{
if(mdm.Application && mdm.Application.path.length > 0)
{
path = "file://"+mdm.Application.path.split("\\").join("/")+path;
};
return path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment