0 Replies Latest reply on Aug 4, 2009 9:51 AM by chandler124

    download from FileReference = Problem




      I want to create a button which allow you to download a file on the server but when I click on it, nothing happens. Can you help me? please


      Code :
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="1308" height="1496">
           <mx:Text y="35" text="Mon CV" horizontalCenter="0"/>
           <mx:List  id="listcv" y="82" height="70" dragEnabled="true" color="black" horizontalCenter="0">
          import flash.net.URLRequest;
          import flash.net.FileReference;
                    private function downloadFile():void {
                          var fileRef:FileReference = new FileReference();
                          fileRef.download(new URLRequest ("src/images/CV.pdf"));
          <mx:Button y="160" label="Télécharger" click="downloadFile()" id="bouton" horizontalCenter="0"/>


      Thank you