Posts Tagged ‘AS3’

Feb 28, 2011

FontSwffer 1.1

FontSwffer
You may remember, in August last year, I released FontSwffer - a tool to simplify the creation of font SWFs for Flash.

Several minor updates and bug-fixes have been released over the last few months, and now, I think, it's time for a 'dot' release. So, here comes FontSwffer 1.1 :)

Along with some little improvements, bug-fixes, and tweaks, the main new features are:

  • Project files:
    You can now save and load all your font setup in FontSwffer project files (.fsproj - an uncompressed XML file)
  • File drag-drop support:
    Drag-drop support has been added to the application for font files (.ttf, .otf, .ttc), font SWFs (.swf), and FontSwffer project files (.fsproj)
  • Application invoke options:
    FontSwffer can now be invoked directly via project files, or by dropping font SWFs and fonts files onto the application icon.

If you've installed an earlier version, the next time you run FontSwffer the update should be downloaded to your desktop and it will ask you if you want to install it right away.

Or, if you fancy it, you can grab the new builds directly:

Windows - FontSwffer_1.1010_win32.zip
OSX - FontSwffer_1.1010_osx.zip

Aug 25, 2010

FontSwffer

Creating font-asset SWFs for Flash used to be a bit of a pain. But now, there's FontSwffer.

FontSwffer is an Air 2 native application for Windows and OSX that lets you configure, build, and preview your font SWFs all in one place. All you need to do is set-up the fonts you want to embed and press a button, that's pretty much it. If you just want the font embed ActionScript to use in your own work-flow, FontSwffer can create that for you too.

FontSwffer uses the Flex 4 SDK to compile your SWFs, just point it to the location of the SDK on your hard-drive and you're good to go.
(more...)

Apr 30, 2010

Blend modes with Pixel Bender – an update…

I posted this blend mode stuff a long time ago, but the interface was awful and it slipped most people by.

So, I've packaged all the code up into a handy SWC and made a better example application for you to play with.

Here's the test page, and here's the SWC. As well as clicking on the source images to load new ones, you can save your blended creations by clicking on the output window.

(more...)

Apr 23, 2010

Playing with Pixel Bender

Pixel Bender filter examples

I've been sitting on a small collection of Pixel Bender filters for Flash for a while now... way too long really. The filters were made a long time ago and since then I've been playing with and improving the user interface in (rare) spare moments.

The UI will be familiar to you if you've played with my JPEGlitch experiments, if not most things have tool-tips to guide you... and if you see an icon, generally speaking, clicking it will do something :)

At its core is a slightly modified version of the minimalcomps library from bit101, which has then been further extended to enable easy creation of parameter-based user interfaces (where a Parameter is an Observable object that has flexible value/range Mapping - inspired by the popforge library).

A handy new feature is parameter tweening - all the sliders can have animation turned on/off in their context menu (right-click). It's only a simple min-max tween that you can start and stop, but it's a quick way of seeing parameters in motion. Also, when not animating, double clicking on a slider will reset it to the default value.

I'll make the source (all the .as and .pbk) available soon. It needs a good tidy-up first, and a few comments probably wouldn't go amiss either. If there's sufficient interest I'll get around to putting it into a public source control of some sort (the Parameter/Snapshot UI framework would benefit most from this). Google code and github are the main contenders at the moment.

There are 4 effect and 6 colour-space filters available to fiddle with - there's a quick overview of the filters and UI below for those that need to know more. In the meantime, why not give them a go!

(249KB, no loader, Flash Player 10 required. For best performance, use the latest 10.1 release candidate)

(more...)

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 19, 2009

JPEGlitch

glitchGrab5

I've been experimenting with glitched JPEG encoding in Flash and have created a version of Thibault Imbert's optimised JPEG encoder that gives control over various glitch parameters.

JPEGlitch Example

A simple test suite that lets you control parameters, experiment with the JPEGlitch class, and load/save images locally. This example uses the minimalcomps ui component library from bit-101.

JPEGlitchRhythm for HYPE

I also made a rhythm for the HYPE framework using the JPEGlitch encoder.

This example is an audio visualiser based on a HYPE sound analyser example and plays 2 short tunes endlessly. The rhythm encodes and re-encodes a bitmap, adding the freshly rendered oscillator canvas on top each time.

This is also my entry to the HYPE 'Friday 13th' competition.

All source

Feed your code-eyes :)

Update 14/01/10 - JPEGlitch get's an honorable mention in the HYPE competition :)

(more...)

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