There are those occasions when our flex application will need to interface with existing sites on the world wide web. To invoke a URL in flash builder is slightly different than any other programming scenario I have used.
I have written a small routing that handles URL requests. The code is as follows”
[codesyntax lang=”actionscript3″]
protected function XQTCmd(cmd : String): void { var urlReq:URLRequest = new URLRequest(cmd); navigateToURL(urlReq, "_blank"); }
[/codesyntax]
Place the routine in the root MXML and invoke the routine by using a coded statement indicated below.
[codesyntax lang=”actionscript3″]
protected function ABWBtn_clickHandler(event:MouseEvent):void { XQTCmd("http://localhost/bm02/bm02-debug/bm02.html") }
[/codesyntax]
This code can be initiated from any event available to the MXML application.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.