Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

making a label as a url link in flex builder

I need to make a label in flex as if you click on it you can open a specific URL let us say Google.

Any ideas?

regards.

like image 819
Muhammad Umar Avatar asked Sep 22 '11 09:09

Muhammad Umar


People also ask

How do I add a hyperlink to a label text?

In order to add a hyperlink, we can bind the label text with a button that makes it clickable. The open_new (url) method is used to define the function that opens a web browser to follow the link.

How do I add hyperlinks (URLs) to a table?

This topic teaches how to add hyperlinks (URLs) to a table. You use Power BI Desktop to add hyperlinks (URLs) to a dataset. You can add those hyperlinks to your report tables and matrixes in either Power BI Desktop or the Power BI service.

How do I make a hyperlink clickable?

Enter the hyperlink in double quotation marks. e.g. And note that this alone doesn't make the label "clickable". Sure, if you click on it (assuming everything runs as expected), it will open another tab but it won't do alternate hover and pressed behavior like normal links do.

How to display a label with a URL in Python?

The open_new (url) method is defined in the webbrowser module in Python which can be imported in the notebook using 'import webbrowser'. Running the above code will display a Label text with a URL. The displayed window will show a hyperlink which upon clicking will redirect the user to the website: www.tutorialspoint.com


1 Answers

Here is sample:

<fx:Script>
    <![CDATA[
        import flash.net.navigateToURL;
        protected function clickHandler(event:MouseEvent):void
        {
            var urlReq:URLRequest = new URLRequest("http://www.google.com");
            navigateToURL(urlReq, "_self");
        }
    ]]>
</fx:Script>
<s:Label x="110" y="149" text="Open Google" click="clickHandler(event)"/>

like image 69
Jarno Lahtinen Avatar answered Sep 24 '22 23:09

Jarno Lahtinen