4 Replies Latest reply on Aug 24, 2009 12:58 PM by pkatpadi

    LinkButton click doesn't launch URL in the bin-release folder

    pkatpadi

      I have a project "xyz.mxml" in which I use a datagrid. The action script assigns a ItemRenderer of object LinkButtonRenderer

       

      gdColumn.itemRenderer = new ClassFactory(LinkButtonRenderer);

       

      This LinkButtonRenderer.mxml is another file in my project "xyz.mxml"

       

      When I run the application in the Flex builder, it runs fine and on the button click the url opens up. But when I copy all the files out from the "/bin-debug" folder to any  other folder, the button click does not work. If I do a "Export Release Build" all the files get created in the "bin-release" folder. But the link button does not work here.

       

       

       

       

       

      <?xml version="1.0"?>

      <!-- LinkButtonRenderer.mxml -->
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"> 
      <mx:Script>
             <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.LinkButton;
                 import mx.controls.Button;
              import mx.controls.Alert;
              import flash.net.navigateToURL;

       

             
              private function handleClick(eventObj:Event):void
                  {
                  var u:URLRequest;
                  u = new URLRequest(data.url.toString());
                  navigateToURL(u, "_self");
                  }  
                    ]]>
           </mx:Script>
              <mx:LinkButton id="url" label="{data.label}" click="handleClick(event);" color="blue"/>
      </mx:VBox>