The events fired from the Distriqt native WebView ANE are listed in the 
metadata here:
[Event(name="locationChange",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="locationChanging",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="complete",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="error",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="javascriptResponse",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="javascriptMessage",type="com.distriqt.extension.nativewebview.events.NativeWebViewEvent")]
[Event(name="touchTap",type="flash.events.TouchEvent")]
For Adobe's native StageWebView there are these events declared:
[Event(name="focusOut",type="flash.events.FocusEvent")]
[Event(name="focusIn",type="flash.events.FocusEvent")]
[Event(name="error",type="flash.events.ErrorEvent")]
[Event(name="complete",type="flash.events.Event")]
[Event(name="locationChanging",type="flash.events.LocationChangeEvent")]
[Event(name="locationChange",type="flash.events.LocationChangeEvent")]
I don't see any timeout events in either of these native web views. 

I recommend you just wrap the web view and provide APIs that make it easy to 
reuse in your app, like a loadUrl() method that calls the web view's loadUrl() 
but not until you spawn a timer. You can also then encapsulate your stage 
sizing logic and set options to simplify it's use, including displaying any 
error messaging on timeout or loading error.

But keep in mind if you are using either of these native stage views and there 
is an error, you cannot display an Actionscript error dialog above a stage 
view. It will be obscured. We got around that by using Distriqt's native Dialog 
ANE that provides all native OS dialogs that also appear on the stage and are 
visible "above" the stage view. Or you can dismiss/dispose the web view and 
then show the error popup. The native Dialog ANE is great though because it 
makes all your popups: spinners, multi-select and list selections, etc., look 
exactly as if they were native apps. No more need to use the flash Alert class 
that looks like garbage.

Cheers,

Erik

On Jan 4, 2018, at 1:22 PM, bilbosax <waspenc...@comcast.net> wrote:

Thanks for the info Erik, it was exactly what I was looking for!

I have one last question for you that is a little unrelated, but you
mentioned in an earlier post that you use a webview ANE and StageWebView so
I thought that you might have run into this.  Do you know if any of these
browsers have a timeout function built into them someway??  The reason I ask
is that if a user clicks a button in my app that pulls up a webview and they
have lost internet connection, the webview just sits there indefinitely
blank.  After five seconds, I would like to put up a message to check their
internet connection or some useable feedback.  My webview is very
interactive so I don't want to have to set up a timer and listen for a
page-loaded event for every function in my app.  I would much rather just
listen to a timeout event and react if necessary.  Do you have any idea if
webviews have a built-in timeout feature??



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/


Reply via email to