2 Replies Latest reply on Jan 5, 2010 3:51 PM by cyber0897

    is there a way to set a url for a link button?

    cyber0897 Level 1

      hey guys, so im trying to set a url link to a dynamic button im creating using actionscript...


      so far i know that you can do


      <linkbutton .....

           click="navigateToURL(new URLRequest('http://yahoo.com/downloadpdf.pdf', 'quote')" />


      but when i create my button in actionscript i dont see an option for click anywhere...


      the code i have is


                          var newButton:customLinkButton = new customLinkButton();
                          newButton.label = item.@name;
                          newButton.tabId = item.@tab;
                          newButton.changeTo = item.@changeTo;
                          newButton.x = item.@posX;
                          newButton.y = item.@posY;
                          newButton.setStyle("skin", null);
                          newButton.styleName = "dynamicButtonStyle";
                          if(newButton.changeTo == "downloadFile"){
                          newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);



      i've tried doing newButton.click but that dosent work...


      i also tried doing newButton.setStyle("click", "navigateToUrl.........")  but with no result...


      i just need to set this button so when i click on it, it will show that download pdf file from link box.....


      any ideas??