const fileReference:FileReference = new FileReference(); fileReference.addEventListener(Event.COMPLETE, removeCur); fileReference.addEventListener(Event.CANCEL, removeCur); fileReference.addEventListener(IOErrorEvent.IO_ERROR, removeCur); fileReference.addEventListener(SecurityErrorEvent.SECURITY_ERROR, removeCur); fileReference.save(myPDF.save(Method.LOCAL,"",Download.INLINE,"myPDF.pdf"),"map.pdf");
1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference
Brad,
That dot Net portion can be avoid completely if you force your clients to use Flash Player 10. If you set your flex projects html wrapper to use flash player 10.0.22 or higher than you can use code like this in your print widgetconst fileReference:FileReference = new FileReference(); fileReference.addEventListener(Event.COMPLETE, removeCur); fileReference.addEventListener(Event.CANCEL, removeCur); fileReference.addEventListener(IOErrorEvent.IO_ERROR, removeCur); fileReference.addEventListener(SecurityErrorEvent.SECURITY_ERROR, removeCur); fileReference.save(myPDF.save(Method.LOCAL,"",Download.INLINE,"myPDF.pdf"),"map.pdf");
Joshua,
The RemoveCur is just a simple function that I have that will remove the busy cursor that I set when the pdf export begins. You can delete all those event listeners if you want to.