How to validate Flash absolute url paths

You may want to dynamically change the way your flash file behaves based on where it’s hosted. To do so, you should utilize the “_url” variable to obtain the absolute path of your flash file.

Actionscript 2:
var path = _root._url;
trace (path);
// here’s how to validate if the flash file is running locally off line.
trace (_root._url.substr(0,7));
trace(“running offline”);

Leave a Reply

Your email address will not be published. Required fields are marked *