0 Replies Latest reply on Apr 5, 2016 3:58 AM by Davide Berra

    StageWebView event queue

    Davide Berra

      Hello!

       

      I got a problem with StageWebView and LocationChanging events.

       

      Let's say i have an application that shows google maps on a StageWebView.

       

      AS3 communicate with StageWebView javascript through the LocationChangeEvent.LOCATION_CHANGING events.

       

      Every time my page Javascript changes location with a code similar to this one

       

      window.location = "mypage.html?variable=value"

       

      a LocationChangeEvent.LOCATION_CHANGING event is triggered in AS3 world. By parsing the location field of the event, i can get the value of "variable" that was set in Javascript world.

       

      Everything works BUT i got a problem if window.location changes too quickly.

       

      It looks like not every location change (in JS) triggers a LocationChangeEvent.LOCATION_CHANGING event in AS3.

       

      In my case i got 10 location changes in less than one second but only 3-4 LocationChangeEvent.LOCATION_CHANGING events are triggered.

       

      How can i fix this? I really need to have a precise match between JS and AS3 events.