Sothink SWF Decompiler for Mac!

I just got word that my favorite decompiler is now available for OS X! I’m really starting to run out of reasons to use Windows at this point. I’ve done some basic tests with this version and everything seems to work exactly the same way as the Windows version. One of the only things that seems to be missing is color coding of AS code which is nice to have when using the Windows version of the tool. No more having to use VMWare or Parallels simply to decompile something. Good news!

As a side note, Sothink has also released a free update to the Windows version giving it a new UI and it also groups ActionScript in package folders which is awesome!

Lee


Event Generator Command for TextMate

I’ve created a little TextMate command that automatically creates event handler functions based on the current line of code. If you have a line like…

this.addEventListener(MouseEvent.CLICK, onClick);

… and you hit Command-E, it will copy the event handler code to the clipboard. Look for a demonstration of this in an upcoming video tutorial. I wrote the command using Ruby and you can copy it right out of the Flash screenshot below.

Enjoy it!
Lee


Flash Player 10 API Documentation!

Yes you heard it right. You can now download the full API documentation for Astro. Go get it and start building and trying to break stuff with the new APIs. We rely on you to help us make the player all it can be.

Lee


Loading Pixel Bender Filters in Flash 10

Below is some bare-bones code that shows you how you can load in Pixel Bender filters at runtime. This example uses the new ability to load local files into the player but you could just as easily use URLLoader to import the PBJ file. However you get the file into your movie, all you need to do is a create a new ShaderFilter using the imported shader data.

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package
{
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    import flash.filters.*;
    import flash.utils.*;

    public class PixelBender extends Sprite
    {
        private var fr:FileReference;
        private var shader:Shader;
        private var shaderFilter:ShaderFilter;
        private var loader:Loader;
       
        public function PixelBender():void
        {
            fr = new FileReference();
            fr.addEventListener(Event.SELECT, onSelect);
            fr.addEventListener(Event.COMPLETE, onComplete);
            loader = new Loader();
            loader.load(new URLRequest("SOME_IMAGE"));
            addChild(loader);
            loader.addEventListener(MouseEvent.CLICK, loaderClick);
        }
       
        private function loaderClick(e:Event):void
        {
            fr.browse();
        }
       
        private function onSelect(e:Event):void
        {
            fr.load();
        }
       
        private function onComplete(e:Event):void
        {
            shader = new Shader(fr.data);
            shaderFilter = new ShaderFilter();
            shaderFilter.shader = shader;
            loader.filters = [shaderFilter];
        }
    }
}

Have fun with it!
Lee


How to Use the Pixel Bender Viewer

One of the things that I have been working on lately is a tool that allows you to load in Pixel Bender (aka Hydra) filters and view them on different types of content like images, vectors, and video. It also allows you to stack filters to see multiple running together at the same time. The tool also includes a few popular filters to try out if you don’t have any on your hard drive. Read the instructions below to learn how to use the tool.

If you want to try out your own Pixel Bender filters, you will need to create the binary filter file that Flash Player 10 can read in at runtime. From the Pixel Bender Toolkit, you will need to export your filter by choosing the menu option shown below:

The file that your export is the one that you can load into the viewer tool. In the current version of the toolkit your file will have an extension of PBJ. From the viewer tool, simple click on the import button and select your filter to load it in. If you don’t have any filters but you still want to play with the viewer tool, you can either download some from the Pixel Bender Exchange or simply select some existing filters using the combo box as shown below:

Please check out the tool and leave any questions or concerns in the comments section of this post.

Lee


1 - 5 of 13 Prev 5Next 5