Thanks for answering Gregor, but you're mistaken ... it automatically works
in Flex, e.g. this code will open the link in the browser by default:


<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
creationComplete="initView()">

<mx:TextInput id='testInput'/>

<mx:Script>

<![CDATA[

*private* *function* initView():*void
*

{

*this*.testInput.htmlText = *"<a href='http://www.juicability.com'>Juicability,
yo</a>"*;

}

]]>

</mx:Script>

</mx:Application>


.. so there must be something else wrong.

It works if we add a link to a button.

Have also tried adding event listeners to the textinput component and used
links with "event:http://"; in the htmlText-code. The events are never
triggered.

The thing is we load the swf using a SWFLoader, so I'm thinking it has
something to do with security. I've tried adding .trustContent=true + using
a new loaderContext like this:

*

var* ctx:LoaderContext = *new* LoaderContext(*true*
,ApplicationDomain.currentDomain,SecurityDomain.currentDomain);

.. aslo didn't change anything.

As I said the cursor changes to the hand cursor when hovering over the link,
it's just that nothing happens when you click it.

- bjorn


2008/10/3 Gregor Kiddie <[EMAIL PROTECTED]>

>    You need to look at,
>
>
> http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html#437546
>
> It doesn't automatically work in Flex, as the automatic behaviour may be
> undesirable.
>
> You need to have event handlers for the link.
>
>
>
> Gk.
>
> *Gregor Kiddie*
> Senior Developer
> *INPS*
>
> Tel:       01382 564343
>
> Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
>
> Registered Number: 1788577
>
> Registered in the UK
>
> Visit our Internet Web site at www.inps.co.uk
>
> The information in this internet email is confidential and is intended
> solely for the addressee. Access, copying or re-use of information in it by
> anyone else is not authorised. Any views or opinions presented are solely
> those of the author and do not necessarily represent those of INPS or any of
> its affiliates. If you are not the intended recipient please contact
> [EMAIL PROTECTED]
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *bjorn
> *Sent:* 03 October 2008 12:33
> *To:* [email protected]
> *Subject:* Re: [flexcoders] swf with TextField.htmlText - links do not
> work
>
>
>
> Well, in flash this works "out-of-the-box" with htmlText .. if you have an
> "a href" tag it's clickable and opens the url in a new window.
>
> 2008/10/3 Gregor Kiddie <[EMAIL PROTECTED]>
>
> What would you expect to happen? Is there code to deal with catching the
> event and opening the url, opening new windows, etc?
>
>
>
> Gk.
>
> *Gregor Kiddie*
> Senior Developer
> *INPS*
>
> Tel:       01382 564343
>
> Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ
>
> Registered Number: 1788577
>
> Registered in the UK
>
> Visit our Internet Web site at www.inps.co.uk
>
> The information in this internet email is confidential and is intended
> solely for the addressee. Access, copying or re-use of information in it by
> anyone else is not authorised. Any views or opinions presented are solely
> those of the author and do not necessarily represent those of INPS or any of
> its affiliates. If you are not the intended recipient please contact
> [EMAIL PROTECTED]
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *bjorn
> *Sent:* 03 October 2008 11:37
> *To:* [email protected]
> *Subject:* [flexcoders] swf with TextField.htmlText - links do not work
>
>
>
> I've got a flex application which loads an SWF which contains a link in a
> TextField's htmlText. It displays the mouse over handcursor and it looks
> like a link - yet when I click it nothing happens. Is there some security
> limitation here?
>
> --
> ========================
> http://www.juicability.com - flex blog
> http://www.nospoiler.com - link to youtube videos without the spoilers
>
>
>
>
> --
> ========================
> http://www.juicability.com - flex blog
> http://www.nospoiler.com - link to youtube videos without the spoilers
>
> 
>



-- 
========================
http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers

Reply via email to