Is there a work around to the getURL Firefox issue? I am having trouble getting Firefox to open my file from my exe when FF is set to my default browser. If FF is already open, the getURL functions fine. If FF is closed, I have to click on my button twice in order to open the file (ie, click once opens a blank window, click again and the file opens) I have FF 2.0.0.1, Flash MX 2004 Prof.
I have tried setting an interval to have the getURL fire again but I can’t seem to get it to work.
Here is my code
// code modified to play standalone
_root.stop();
// create array for documents
this.doc0 = "Westfield Insurance Surety Operation";
// set up array to handle pdf documents
this.pdf0 = "AD 1519 front _09-06_.pdf";
//
for (i=0; i<10; i++) {
//check for undefined
if (this["doc"+i] == undefined) {
_root["press_mc"+i]._x = 800;
} else {
//this creates the text field
_root.attachMovie("PressText", "press_mc"+i, 60+i);
_root["press_mc"+i].name.text = this["doc"+i];
_root["press_mc"+i]._x = 300;
_root["press_mc"+i]._y = 150+(i*20);
//sets the text width to character length
_root["press_mc"+i].name.autoSize = true;
//
//this creates the button it overlays the text at a higher level
_root.attachMovie("PressText1", "press_mc1"+i, 70+i);
_root["press_mc1"+i].name1.text = this["pdf"+i];
_root["press_mc1"+i]._x = 300;
_root["press_mc1"+i]._y = 150+(i*20);
_root["press_mc1"+i]._alpha = 0;
// set both text boxes to same width
_root["press_mc1"+i].name1._width = _root["press_mc"+i].name._width;
//
//add the document icon
_root.attachMovie("press_icon", "icon"+i, 85+i);
_root["icon"+i]._x = 275;
_root["icon"+i]._y = 145+(i*20);
//
_root["press_mc1"+i].onRollOver = function() {
//trace("Documents/"+this.name1.text);
};
_root["press_mc1"+i].onRelease = function() {
getURL("Documents/"+this.name1.text, "_blank");
var intervalID:Number = setInterval(callback1, 10000);
clearInterval(intervalID);
};
//
//
}
}
function callback1() {
trace("interval called");
getURL("Documents/"+this.name1.text", "_blank");
}