Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

How to create Hyper Link in flex

New Here ,
Nov 22, 2010 Nov 22, 2010

can you please tell me how to create Hyper Link in flex so that it need's to show hand Cursor on Mouse Over and it can abel to select the text on link.

11.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Nov 23, 2010 Nov 23, 2010

You can add a link to any RichEditableText.

<s:RichEditableText>

     <s:content><s:p>Here is a link: <s:a href="www.google.com"</s:a></s:p></s:content>

</s:RichEditableText>

If you're using Flex 3, than you can use the htmlText property with an anchor tag.

Translate
Explorer ,
Nov 22, 2010 Nov 22, 2010

<mx:LinkButton:id="button"
        label="
WeCodeThings Code Library" usehandCursor='true'
        click="navigateToURL(
new URLRequest('http://www.url.com/'), '_blank')" />

mark this as correct answer if helpful

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 22, 2010 Nov 22, 2010

@Maradolla,

You can try this....

/*css*/

.linkMouseOver{
font-family:Calibri;
font-size:12;
color:#357dae;
text-decoration:none;
font-weight:bold;
}

.linkMouseOut{
font-family:Calibri;
font-size:12;
color:#FF0000;
text-decoration:underline;
font-weight:bold;
}

<mx:Label id="lblPrint" selectable="true" text="Print" buttonMode="true" click="navigateToURL(new URLRequest('http://www.google.com/'), '_blank')" styleName="linkMouseOut" mouseOver="{lblPrint.styleName='linkMouseOver'}" mouseOut="{lblPrint.styleName='linkMouseOut'}" textAlign="right" useHandCursor="true" buttonMode="true" mouseChildren="false"/>

Thanks,

Bhasker Chari.S

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 23, 2010 Nov 23, 2010

Hi Bhaskar,

Thanks for your reply, I too tried the same way, but link is not abel to selected and not abel to copy, is there any other way to impliment same like HyperLink, so that we can perform click on that and we can select and copy the link, and we need to show hand cursor on mouseover.

Thanks

Ram

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2010 Nov 23, 2010

if all the text is a hyperlink you can use mx:LinkButton

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2010 Nov 23, 2010

You can add a link to any RichEditableText.

<s:RichEditableText>

     <s:content><s:p>Here is a link: <s:a href="www.google.com"</s:a></s:p></s:content>

</s:RichEditableText>

If you're using Flex 3, than you can use the htmlText property with an anchor tag.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 23, 2010 Nov 23, 2010

If you want the hand cursor upon mouseOver and are using RichEditableText in Flex 4, be sure to set editable=false. If editable=true (the default), you won't get the hand cursor and you will need to Ctrl+click to go to the link.

Joan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2012 Jun 17, 2012
LATEST

this's simplest way to do this

you just need to set two properties true:

buttonMode="true"

useHandCursor="true"

<s:Label id="home" text="HOME"  buttonMode="true" useHandCursor="true" click="home_clickHandler(event)"/>

That's it..

Ali

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines