<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:j="library://ns.apache.org/royale/jewel" xmlns:js="library://ns.apache.org/royale/basic" initialize="initialize()" >
<fx:Script> <![CDATA[ import org.apache.royale.jewel.Alert; import mx.external.ExternalInterface; public function initialize():void{ var browserUrl:String = window.location.href; Alert.show( browserUrl ); } ]]> </fx:Script> </j:Application> > On Aug 9, 2022, at 6:44 PM, cont...@cristallium.com wrote: > > Thanks for your quick reply. > > No way. Perhaps I do something wrong. > It's working when I run in local (return > "file:///D:/dev/Royale/MyProject/bin/js-debug/index.html"), but it return > empty string on production server. > > Here is my code : > > <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:j="library://ns.apache.org/royale/jewel" > xmlns:js="library://ns.apache.org/royale/basic" > initialize="initialize()" > > > <fx:Script> > <![CDATA[ > import org.apache.royale.jewel.Alert; > import mx.external.ExternalInterface; > > public function initialize():void{ > var browserUrl:String = ExternalInterface.call("eval", > "window.location"); //same result if I use window.location.href > Alert.show( browserUrl ); > } > ]]> > </fx:Script> > </j:Application> > > > Le 2022-08-09 17:05, Harbs a écrit : > >> just use "window.location". >> Make sure to use a JS block if you're compiling to something other than JS >> too... >>> On Aug 9, 2022, at 5:31 PM, cont...@cristallium.com wrote: >>> Hi all, >>> I'm struggle on getting browser full url. (sdk 0.9.10) >>> I tried this : >>> var browserUrl:String = ExternalInterface.call("eval", >>> "window.location.href"); >>> Unfortunately this doesn't work in my case. >>> Is there another way to get it ? I know >>> ApplicationParametersCaseInsensitive as a beads , it works great for >>> parameters but it has no getter for full url. >>> Thank in advance for your reply >>> Regards >>> Fred >