How to Modify SWF without Recompilation

Usage : java -jar SWFCompress.jar c 'YourSWF.swf'


Usage : java -jar SWFCompress.jar d 'YourSWF.swf'
Now the re compressed SWF is ready to go. Have Fun Cracking, Hacking SWF’s
Posts Tagged ‘ swf ’

Usage : java -jar SWFCompress.jar c 'YourSWF.swf'


Usage : java -jar SWFCompress.jar d 'YourSWF.swf'
Now the re compressed SWF is ready to go. Have Fun Cracking, Hacking SWF’s
A Quick tip, was stuck today to load an local image / swf inside AIR at MAC OS.
The below is the solution:
var filenotion:String =”;
if(Capabilities.os.search(“Mac”) >= 0) filenotion = “file://”;
Image.source= filenotion +imgFileURI;
The Below code demonstrates the conversion of ByteArray to BitmapData. In the below case, SWF is loaded and converted into BitmapData
private function swfLoad_complete(evt:Event):void {
byteArrayToBitmapData(swf.content.loaderInfo.bytes);
}
private function byteArrayToBitmapData(ba:ByteArray):void {
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, getBitmapData);
loader.loadBytes(ba);
}
private function getBitmapData(e:Event):void {
var content:* = loader.content;
var BMPData:BitmapData = new BitmapData(content.width,content.height);
var UIMatrix:Matrix = new Matrix();
BMPData.draw(content, UIMatrix);
}
Overcome restrictions on an AVM1 SWF file loaded by an AVM2 SWF file:
While trying to control AVM1Movie (Flash Player 8, 9, 10 or older) from flex, we will get the below error message: ”Property stop not found on flash.display.AVM1Movie and there is no default value. ”
To overcome this problem, ForcibleLoader class converts them into latest player versions on runtime. The below is an working example for how to control AVM1Movie from Flex.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” initialize=”init()”>
<mx:Script>
<![CDATA[
private var swfURL:String = "AVM1Movie.swf";
private var libMC:MovieClip = new MovieClip();
private function init():void{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfComplete);
var fLoader:ForcibleLoader = new ForcibleLoader(loader);
fLoader.load(new URLRequest(swfURL));
swfContainer.addChild(loader);
}
private function swfComplete(event:Event):void{
libMC = event.currentTarget.content as MovieClip;
libMC.gotoAndStop(1);
}
]]>
</mx:Script>
<mx:UIComponent id=”swfContainer”/>
<mx:NumericStepper id=”slide” change=”{libMC.gotoAndStop(slide.value)}”/>
</mx:Application>
1. Tell any loaded .swf child assets to disable themselves.
2. Stop any sounds from playing.
3. Stop the main timeline, if it is currently playing.
4. Stop any movie clips that are currently playing.
5. Close any connected network objects, such as instances of Loader, URLLoader, Socket, XMLSocket, LocalConnection, 6. NetConnections, and NetStream.
7. Release all references to cameras and microphones.
8. Remove all event listeners
9. Stop any currently running intervals (via clearInterval()).
10. Stop any Timer objects (via the Timer class’s instance method stop()).
11. Dispose all subobjects
12. Release all references to external objects
In future Flash Player 10, does these by calling the Loader class’s new method unloadAndStop().
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Mar | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||