Hi Siva,
If you know the link you are trying to download you can just parse the
straight html text, get the link, then submit a URLRequest for it.
If the user is browsing to arbitrary pages and clicking arbitrary
things, you can do a hack solution by parsing every page he lands on
then when you detect a mouseclick (not sure if this is possible within
the HTMLRenderer, but if it's not you can render an invisible Sprite
over it and detect mouseClick), then presenting a little dialog with all
the possible <a href>'s that you parsed out for the user to select...
Also, If it's a straight <a href> tag and not some server side script
that's serving up the file, I think the HTMLRenderer's location property
changes to the file URL (blah.zip) when user clicks, so when you detect
non-web extensions in the HTMLRenderer just initiate a URLRequest for it...
hope that helps,
Lushen
On 12/23/2008 11:04 PM, shiv_indian wrote:
Hi Alex,
This is one of requirement from our customer. Is there any
alternative for ExternalInterface or is there any feature in
<mx:HTML> tag to download files / attachments.
Thanks & Regards,
Siva Kumar
--- In [email protected]
<mailto:flexcoders%40yahoogroups.com>, Alex Harui <aha...@...> wrote:
>
> If the embedded HTML contains Javascript that is trying to use
ExternalInterface, that won't work, but I don't understand why you
would need that to download a file.
>
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com>] On Behalf Of shiv_indian
> Sent: Tuesday, December 23, 2008 2:35 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Embedding HTML page into Flex using Adobe AIR
>
>
> Hi,
>
> This is Siva Kumar. Need help in embedding an HTML in Flex . We
> are using Adobe Air using Flex. To embed an HTML in Flex we used
> <mx:HTML> tag. Its working fine but whts the problem is its not
> allowing to download files / attachements. To download attachments
> do I need to change any files in flex. I tried to use google flex
> iframes to resolve this issue. I am able to download
> files/attachments if I open application as web / standalone. If I
> try to open same application using adobe air its giving error like
>
> " ExternalInterface is not available in this container. Internet
> Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other
> browsers that support NPRuntime are required." .
>
> Later wht I found is at present ExternalInterface is not supporting
> adobe air.
>
> Could anybody help me to resolve this issue. If anybody has any
> idea on how to overcome this issue. Please suggest me to resolve
> this issue. Thanks in Advance.
>