Showing Local HTML

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Showing Local HTML

Bilbosax
In my AIR app that I am converting to Royale, I have a Google Map html file
that I would display using an ANE by Distriqt called NativeWebView.  It
created a webView on the mobile device that you could upload your local html
file to, and it created an AirBridge that allowed actionscript to call
Javascript functions or vice versa.  A beautiful and useful piece of code.

How would I do something like this on Royale?  Is there a component that
allows you to load local html files and pass information back and forth with
Javascript (like the old stageWebView or htmlLoader)?



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Showing Local HTML

Carlos Rovira-2
Hi,

some of the things you need to do in Flex due to Flash Player are not needed anymore in Royale. The Player was very good in many things but had the problem that it was a sandbox that needed special ways to interact with the browser and js. You need to change your mindset and take advantage of that, while keeping the good things we still get from the Flex world that are not outside of Royale in other js technologies ;). Think on Royale as the "best of both worlds".

So, since Royale compiles to js, you can interact directly with html and use for example IFrame (there's an implementation in HTML.swc lib), also you can use native js libraries in many ways.

Some links to help you:

1.- This is a project for a small product browser integrated in a webpage. The royale app use a js library with @externs (a good way to put a js lib to play in Royale with AS3). The library is for create a PDF from a web page. Also the project shows how to integrate the app in the webpage to adapt its width and height to the web page so you don't know it's a royale app:


2.- Externs:


3.- ExternalInterface (But I think you should go with Externs since this seems to me and old Flex concept not needed in Royale)


HTH

Carlos


El vie, 22 ene 2021 a las 22:31, Bilbosax (<[hidden email]>) escribió:
In my AIR app that I am converting to Royale, I have a Google Map html file
that I would display using an ANE by Distriqt called NativeWebView.  It
created a webView on the mobile device that you could upload your local html
file to, and it created an AirBridge that allowed actionscript to call
Javascript functions or vice versa.  A beautiful and useful piece of code.

How would I do something like this on Royale?  Is there a component that
allows you to load local html files and pass information back and forth with
Javascript (like the old stageWebView or htmlLoader)?



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
Apache Member & Apache Royale PMC
Apache Software Foundation