1 Reply Latest reply on Nov 2, 2011 6:47 AM by saisri2k2

    is there any ways to create automated function in actionscript to create hyperlinks?

    SunilRana_Gateway Level 1

      Hi want to make multiple Link when we pass multiple links in string throught function .

       

       

       

      e.g.getUrlParsedMessage(‘ “http://www.google.com”http://www.google.com”‘)

      then i want result like

        "http://www.google.com" "http://www.google.com"

       

      with hyper links in both links with clickable

       

       

      Please reply if you have any idea

       

       

      Thanks,

      Sunil

        • 1. Re: is there any ways to create automated function in actionscript to create hyperlinks?
          saisri2k2 Level 4

          group.addElement(getUrl("http://google.com","http://yahoo.com"));

                                 

          /////////////////////////////

           

                                        private function getUrl(... url):HGroup{

                                                  var hgroup:HGroup = new HGroup();

                                                  for (var str:String in url){

                                                            var button:LinkButton = new LinkButton();

                                                            button.label = url[str];

                                                            button.addEventListener(MouseEvent.CLICK, onClick);

                                                            button.setStyle("color","blue");

                                                            button.setStyle("textDecoration","underline");

                                                            hgroup.addElement(button);

                                                  }

                                                  return hgroup;

                                        }

           

                                        private function onClick(e:MouseEvent):void{

                                                  navigateToURL(new URLRequest(LinkButton(e.target).label));

                                        }