3 Replies Latest reply on Aug 6, 2009 1:54 AM by Vitor Wsis

    Download Files

    Vitor Wsis

      Hi,

       

      I have this code for download the file "logoFotoClik.jpg" from the server:

       

      <mx:Script>
          <![CDATA[
         
              private function downloadFile():void{
                  var request:URLRequest = new URLRequest("../downloads/logoFotoClik.jpg");
                  var fileRef:FileReference = new FileReference();
                      fileRef.download(request); 
              }

       

          ]]>
      </mx:Script>
          <mx:Canvas height="100%" width="100%">
           
              <mx:Label x="99" y="97" text="Logótipo Lp Fotógrafo"/>
              <mx:LinkButton label="jpg" y="94" x="261" click="downloadFile()"/>
          </mx:Canvas>

       

      but doesn't work!