Sorry left of the most important part... you can leave of the http://part and
just load a local html file embedd3ed in your flex/air app
Example
...
webView1.source - remotepage0;
...
where remotepage0 can also take the form,
remotepage0 ='assets/htmlfiles/abcd.html'; etc etc
Works great and its free Hope this helps and is slightly clearer.... //GH
-----Original Message-----
From: Greg Huddleston
Sent: Thursday, March 07, 2013 3:15 PM
To: [email protected]
Cc: Greg Huddleston
Subject: RE: who Open HTML in the Flex ?
Perhaps this may useful for the orig poster of the request, as I did something
in Jan of a similar nature for a Flex Mobile Project I was working on for a
medical conference...
For a Flex Mobile project I just created I used (part-of) a component package @
https://code.google.com/p/flexcapacitor/ used the (badly named because of iOS)
->" WebView "
Download it out of github from the URL above and unzip.
a) (what I did),
Place the component in this path in your project
(flexprojectxxx/src/com.flexcapacitor.controls)
Inside of this put Webview.as (I presume other components from this
package would go here if you wanted them/needed them
b) Next
Inside script code (I call it on initializerload to load first 'web'
page into my view":
...
<fx:Script>
<CDATA[
import events.flexevent;
public var remotepage0:String = "http://labs.adobe.com";
public function onViewInitialize():void {
...
webView1.source - remotepage0;
...
} //end of onViewInitialize
...
protected function button0_clickhandler(event:MouseEvent):void {
`webView1.source =remotepage0;
}
Or alternatively you could do-a:
protected function button1_clickhandler(event:MouseEvent):void {
navigator.pushview(vew.testview1) // and place the 'code' that
in button0_clickhandler in the view (again depending on what type of flex
project you are outputting here)
}
... ect ect...
I put my CSS, images and html in a flat folder structure and accessed it that
way fine in the HTML.
Think that might be enough to get you going if this components function fits
your exact needs.
One more thing. For Flex Mobile -> Android <- this wont work exactly unless
you COPY the HTML content, CSS images first at initialization time, then call
that the function as this is the way Android OS works (probably for protection
reasons). Google around for threads dealing with this issue IF it is needed
for your particular project (not sure about iOS as I have no device to test any
of these behaviors against) as my project was purely Android.
Also note, I have zero affiliation with the makers of this code. I just used
it and it worked for me and it was zero cost.
Hope this helps. Cheers //GH ([email protected])
-----Original Message-----
From: Alain Ekambi [mailto:[email protected]]
Sent: Thursday, March 07, 2013 2:45 PM
To: [email protected]
Subject: Re: who Open HTML in the Flex ?
Dont get me wrong i have nothing against the component.
It looks great and probably deserves the price.
It s the idea that i have to pay some money to display HTML inside a web app
that does nt sound right to me.
If something is going to run in the browser one would expect it will be able to
display HTML and operate well with JavaScript.No ?
"I still have dreams of rendering HTML as Flash display objects. I posted a
prototype of that years ago and started a re-write just before the big change.
I think I may actually get back to it as part of the FlexJS stuff way in the
future."
I m looking forward to seeing that in action
2013/3/7 Alex Harui <[email protected]>
>
>
>
> On 3/7/13 2:18 PM, "Alain Ekambi" <[email protected]> wrote:
>
> > 249 USD to display HTML in a web application. Insane.
> The author of this component occasionally posts on Apache Flex mailing
> lists. Maybe you can negotiate a deal with him.
> > You gotta wonder what Adobe was thinking to not adding a fundamental
> > feature like this inside Flash/Flex
> I, for one, did not want to take on the maintenance of HTML/JS code at
> the time.
>
> I still have dreams of rendering HTML as Flash display objects. I
> posted a prototype of that years ago and started a re-write just
> before the big change. I think I may actually get back to it as part
> of the FlexJS stuff way in the future.
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>