This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected var callback:Function; | |
| public function ConfigLoader( path:String, _callback:Function ) | |
| { | |
| this.callback = _callback; | |
| var configLoader:URLLoader = new URLLoader(); | |
| configLoader.load( new URLRequest( path ) ); | |
| configLoader.addEventListener( Event.COMPLETE, processXML ); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static const LOCATION_XML:String = "/conf/myXML.xml"; // Location of your XML relative to your application | |
| var controller:ConfigLoader = new ConfigLoader( LOCATION_XML, retrieveXML ); | |
| protected function retrieveXML( xml:XML ):void | |
| { | |
| // Do something... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var file:File = File.desktopDirectory.resolvePath("myXML.xml"); // This file doesn't exit yet | |
| var stream:FileStream = new FileStream(); | |
| stream.open(file, FileMode.WRITE); | |
| stream.writeUTFBytes(newOutput); // newOutput of type XML | |
| stream.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Objects in file panda.swf: | |
| [-i] 36 Shapes: ID(s) 28, 30, 33, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 87, 91, 119, 120, 123, 129, 130, 143 | |
| [-i] 9 MovieClips: ID(s) 31, 34, 35, 135, 136, 144, 147, 175, 191 | |
| [-j] 2 JPEGs: ID(s) 27, 86 | |
| [-p] 2 PNGs: ID(s) 29, 32 | |
| [-s] 26 Sounds: ID(s) 2-26, 92 | |
| [-F] 4 Fonts: ID(s) 88, 126, 149, 181 | |
| [-M] 8 Embedded MP3s: ID(s) 31, 34, 35, 136, 144, 147, 175, 191 | |
| [-f] 1 Frame: ID(s) 0 | |
| [-m] 1 MP3 Soundstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swfextract panda.swf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Objects in file panda.swf: | |
| [-i] 1 Shape: ID(s) 1 | |
| [-b] 2 Binarys: ID(s) 2, 3 | |
| [-f] 1 Frame: ID(s) 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!bin/bash | |
| pwd=`pwd` | |
| # Set the quality factor to 80 | |
| qualityCompression=80; | |
| # Set a minimum quality factor to 20 | |
| qualityLimit=20; | |
| # To run a new compression | |
| second_run_compression=false; | |
| # For batch compression |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # !/bin/bash | |
| for NUM in {2..26} 92 | |
| do | |
| swfextract -s $NUM output.swf -o "xylo_sounds/sound_$NUM.mp3" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # !/bin/bash | |
| for NUM in {2..26} 92 | |
| do | |
| swfextract -s $NUM panda.swf -o "sounds/sound_$NUM.mp3" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parseJSON = function (weaponJSON) { | |
| var object = JSON.parse(weaponJSON); | |
| console.log(object.frames['chaingun_impact.png'].spriteSourceSize.x); | |
| }; |