I'd like to create a standalone desktop flash application (AS3 with Flash CS6, published as an .exe projector). This app will load .swf files created with print2flash (trial version) from word documents.These Word documents contain hyperlinks. I want my application to get the url of the links clicked but I don't need any browser interaction.
Thanks to the comprehensive help section, I managed to do everything except that I cannot prevent the browser from opening when a link is clicked!
Here are the relevant parts of my code:
Code: Select all
public class ContentLoader {
var loaderText:Print2FlashDoc3;
var mcText:MovieClip;
public function loadTextSWF (fileName:String, parent:DisplayObjectContainer):void {
loaderText = new Print2FlashDoc3(fileName,30,140,395,480,parent);
loaderText.addEventListener(Print2FlashDoc3.ONLOADEVENT, OnLoaded);
}
private function OnLoaded(e:Event) {
mcText=loaderText.getDoc();
mcText.addEventListener("onLinkClicked", onLinkClicked);
}
private function onLinkClicked(e:Object): void {
//Here I get "e.url". Job done, I don't need anything else but the browser always opens at this stage!!!
}
}
- • play with the "_blank", "_self", etc. hyperlink targets both in Word and in P2F conversion parameters
• Enhance flash security settings so my app cannot get access to the Internet (I don't know how to do that)
• Override the 'navigateToURL()' function that must be called somewhere in the swf file produced by P2F (no idea if this is possible)
Any advice welcome!!!!
Thanks,
Max