If you have ever tried to do a simple getURL() command in Flash from an .exe projector you’ll notice that it fails when Firefox is your default browser.
Following is the solution to the problem in both AS 2.0 and AS 3.0
Here’s the code for the fix in AS 2.0:
// code on a keyframe on the main timeline
var swfUrl:String = _root._url;
var lastSlashIndex:Number = swfUrl.lastIndexOf("/");
var pipeIndex:Number = swfUrl.indexOf("|");
var baseUrl:String;
if (pipeIndex >= 0)
{
baseUrl
→ Continue reading “getURL() in a Projector Firefox Bug and Solution”