Hey all,
I have this code and the link works ok, except that when I have clicked
it once and want to click the link again, it does not work.
Only way to get it to work is to click two times, or click somewhere else
in the scene between the clicks so that the link looses focus before I click the second time.
Can anyone help me with how to make the link work every time.
//Create the Release notes textfield
var tfReleaseNotes:TextField = new TextField();
//tfReleaseNotes.width = 440;
tfReleaseNotes.autoSize = TextFieldAutoSize.RIGHT;
tfReleaseNotes.embedFonts = true;
tfReleaseNotes.defaultTextFormat = tFormLink12;
tfReleaseNotes.selectable = false;
tfReleaseNotes.multiline = false;
tfReleaseNotes.wordWrap = false;
tfReleaseNotes.htmlText = createLink("download/fxc-releasenotes.txt",releaseNotesDisplayText);
//tfReleaseNotes.htmlText = createLink("download/" + currentAppFolder + "/fxc-changelog.txt",changeLogDisplayText);
tfReleaseNotes.x = 380;
tfReleaseNotes.y = 65;
tfReleaseNotes.addEventListener(TextEvent.LINK, linkHandlerMain);
DownloadsMC.addChild(tfReleaseNotes);
And the code that launches the link:
function linkHandlerMain(e:TextEvent):void
{
var request:URLRequest = new URLRequest(e.text);
navigateToURL(request);
}
Thanks in advance
Peter