Skip to content

Instantly share code, notes, and snippets.

@srohde
Created November 7, 2010 19:52
Show Gist options
  • Save srohde/666366 to your computer and use it in GitHub Desktop.
Save srohde/666366 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Home"
xmlns:local="*">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function stageWebView_locationChangingHandler(event:LocationChangeEvent):void
{
trace("location changing " + event.location);
// You can call event.preventDefault() to prevent the URL change
}
protected function stageWebView_locationChangeHandler(event:LocationChangeEvent):void
{
trace("location change " + event.location);
}
]]>
</fx:Script>
<mobile:StageWebViewUIComponent xmlns:mobile="com.soenkerohde.mobile.*" id="stageWebView" url="http://google.com"
locationChanging="stageWebView_locationChangingHandler(event)"
locationChange="stageWebView_locationChangeHandler(event)"/>
</s:View>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment