Strict Standards: Only variables should be passed by reference in /home/abeall/public_html/fireworks/download.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/abeall/public_html/fireworks/download.php:28) in /home/abeall/public_html/fireworks/download.php on line 44
// Fireworks JavaScript Command // Fireworks/Configuration/Commands/ var dom = fw.getDocumentDOM(); // document object function CreatePatternFromDocument() { // require active document if (!dom) return false; // user input var input, filename, validFilename = new RegExp('^[^\\\./:\*\?\"<>\|]{1}[^\\/:\*\?\"<>\|]{0,254}$'); do{ input = prompt('Enter a name:', input || ''); filename = fw.appPatternsDir + '/' + input; }while(!validate()); function validate(){ if(input == null) return true; if(!validFilename.exec(input)) return alert('Invalid name! Only use names that are valid filenames.'); if(Files.exists(filename + '.png')) return fw.yesNoDialog('A pattern with this name already exists. Overwrite existing?'); return true; } if(input == null) return false; // export pattern to default dir dom.exportTo(filename,{ exportFormat:'PNG', colorMode:'32 bit', paletteTransparencyType:'rgba' }); alert("Pattern has been saved. However, you will need to restart Fireworks for it to appear in the menu, or use the Patterns and Texture panel."); } CreatePatternFromDocument();