Posts Tagged ‘ActionScript’

Mar 10, 2010

JPEGlitch test suite

Well, it's been a while, but I finally got an improved test suite together for my JPEG glitching experiments.

The code available here includes the previously released JPEGlitch and JPEGlitch for HYPE, as well as the source for the 'decode glitching', where the JPEG bytes are mangled to add glitches before being loaded.

The interface allows you to control various glitch parameters and you can either process continuously or one step at a time. Each module has a pre-made set of parameters - choose 'example' in the snapshots drop-down of a module window to select them. You can also load /save JPEG images to your local file-system.

The UI might have some minor bugs, but it's usable. I've modified the lovely minimalcomps UI component set from bit-101, adding a custom framework for easy creation of parameter based interfaces. I also added bitmap icons to minimalcomps - compiling the 1000 famfamfam silk icons into a handy SWC - with all icons pre-compiled into buttons for importing into the project. Read more about creating the icon library, read the set-up guide, and get the code to do it separately, here.

This update is a step on the way to a larger suite of byte-glitching tools for images, audio, video, text, or any other file you might want to mess with... no eta. on that, but it's in the brain pipes.

Test suite

Source code

Jan 13, 2010

JPEGlitch update…

Just a quick update on some new features and improvements to my JPEG glitching code for AS3.

Check out a little demo of newly added 'decode glitching' here and see some test images saved from the Flash, here.

It should work with most JPEGs -  I've implemented and tested parsing for progressive/baseline/optimised etc. But if you find one that won't load, let me know and I'll see if I can add support for it.

This is still a work in progress, so all the user control of glitching and the source code will come at a later date.

Enjoy.

Nov 9, 2009

AS3 WOFF Parser

I recently stumbled upon the Web Open Font Format (WOFF) when trying out the Firefox 3.6 beta, and thanks to the well documented WOFF file format, made this AS3 WOFF parser for Flash.

Initially the parser was just an experimental project that would let me get my teeth into a bit of ByteArray manipulation. After all, parsing a WOFF file lets us read the original font tables and any metadata or private data contained - but the font tables aren't much use in Flash without further parsing.

Then I remembered reading about Thibault Imbert's research into converting TTF fonts to AFM (Adobe Font Metrics) at runtime using a c library compiled to AVM bytecode with Alchemy - and realised this parser class could probably be used in conjunction with something like that. So it may end up having uses after all. :)

I'm making the WOFFParser class available here with an open source licence, along with a FlashDevelop project and a WOFF file to test it with. I created the WOFF for my test with a command-line tool (included) and embedded a test metadata xml file in it. The WOFF file specification also allows vendors to include a chunk of unspecified private data - the class will also allow access to those bytes if present. I included a PNG image as the private data in the test WOFF file, which you will see if you build the project.

For further WOFF resources; I used the command line tool sfnt2woff to create the WOFF file for this project and font squirrel support the WOFF format with lots of resources in their @font-face sections.

AS3 WOFF parser source

Nov 4, 2009

Reducing the drudgery of embedding fonts in AS3

Using and managing embedded fonts in Flash is a lot easier than it was a few years ago, but I still find myself repeating tedious steps of set-up each time I need to create a new font-asset swf.

So, I created an Air application to do it for me ;)

Skip to the end to download the app and source, or read on for all the juicy details...

(more...)

Oct 30, 2009

Something in the air…

Yes, it's close to that time of year again. So here comes the snow...

This requires Flash Player 9.0.124 or greater get it here

The example above (mouse-over to activate) is a Flash 9 example with 1000 blurry snow particles continually falling on random paths. There is also a slightly tweaked version targeting Flash Player 10 (no noticeable performance gains here I'm afraid, just replaced a few Arrays with strictly typed Vectors), and an AS2, Flash 8 version.

The AS2 version can't handle as much snowfall, but the 300 particle example in the source download gives (me) the same processor load as 1000 particles in the AS3 versions (~30% on an old 2GHz pentium, and ~2% on a 2.83GHz Core2Quad)

For speed, I've implemented a linked-list for the particles and there are no transformations on them in motion, except for x/y translation. I'm also pre-drawing and blurring each particle bitmap when the class initialises, then re-cycling them when they leave the snow bounds.

The compiled size of the Snow class is about 4KB for the AS3 versions, and 5KB for the AS2. I've embedded the winter trees image in the examples, so the end file sizes are about 36KB larger than they would be with just the snow.

Feel free to use the code as you want, any feedback or details of how and where you've used it would be great :)

Snow (includes all source files and the example above)

Mar 19, 2009

New Javascript Engines and Silverlight 3.0

There is some serious competition mounting now for development platforms the next generation of RIA will be built with.  Flash and ajax/javascript  are well established currently with  ajax/javascript leading in terms of availability and Flash in terms of creative presentation and performance.  (more...)

Mar 10, 2009

I Love Charles….

I do - and if you do any web development then you will too.

not this charles.

Not this charles.

(more...)

Sep 2, 2008

Panasonic Everything Matters

Came across this cool flash site for Panasonic. It's got a real nice Explorative feel to it, with cool use of Flash to access some pretty interesting/engaging content.