August 04, 10

Webcam stories

Pressure. It's all coming along. This Saturday, the Art Tech Seminars at Assembly Summer in Helsinki, Finland, 7th of August at 2.00PM. WebCam stories.

If you want to experience the potential of Flash and a typical webcam to achieve face recognition, eye tracking and motion detection, using real-time image processing, come and see. I will share how we can use our often dusty and under-used webcams to make our eyes less tired after hours of gazing into pixels.

Another good news is that HiSlope toolkit will be finally released there.

Although the Flash Player is recently being eschewed in favour of emerging HTML5+JS technologies (most notably by Apple), I will prove it still offers decent processing power and support for external devices such as webcam and microphone (which HTML5 is not yet capable of) and can significantly contribute to improving real human-computer interfaces.

Thanks to Justyna for a cheeky title :)

PS I also got the chance to speak at the Elevator Pitch this Autumn, which is part of Flash on the Beach conference in Brighton, UK (26-29 September 2010) – my very own 3 minutes!

10:51 PM | | 3 Comments | Tags: , , , ,
May 25, 10

Embedding Private Keys in SWF files

I've recently came across the new online SWF, Zend, and Java decomplier at showmycode.com that allows you to almost "view the source" of the SWF file online. If you had some important data stored in your SWF (such as API keys or passwords) you may not wish them being exposed.
The easiest (and therefore naïve) way to hide them* would be to store them in external text files and embed in the SWF.

[Embed(source="api_key.txt", mimeType="application/octet-stream")]
private const API_KEY:Class;

// ...

var myAPI_KEY:String = String(new API_KEY());

Then you can create an instance and cast it to String, like shown above.

The asset class extends mx.core.ByteArrayAsset and its byte content is not revealed by most decompilers.

*Of course, this "solution" does not offer any serious protection, you can still decompress the SWF and view the keys in the hex editor. You could scramble/hash them a bit to make the hacker's job harder but it's still possible to extract them.

12:46 PM | | 2 Comments | Tags: , ,
May 01, 10

Flash Bokeh

Sometimes your best efforts to convince clients to originality end up in the trash... but on the other hand there is nothing wrong with it – just shake the dust off and share. This time it's the colourful realtime bokeh effect inspired by this tutorial and programmed for tictoc as a proof-of-concept demo.

Flash AS3 Bokeh

Click the image above to preview. Due to expensive alpha and blending processing it may slow down your browser/computer a bit. I've tried two approaches there:

  1. Adding and removing circles to the display list (with cacheAsBitmap turned on).
  2. Drawing circles onto (transparent and non-transparent) bitmap using draw() method.

Both methods eat similar processor time. Haven't tried using any GPU wmodes, not sure if that would help at all here, I'll leave it to you - the code is very simple and there's a lot of room for improvements and optimisations.

Considering the recent HTML5 vs Flash war, the challenge is to code a similar effect using JS + HTML5's canvas and compare the speed – is anyone up for it?

Grab the source (AS3, Flash CS4 was used to tween the circle shapes but you could entirely use drawing API if needed) and enjoy!

11:00 AM | | 2 Comments | Tags: , ,
February 11, 10

Including imports

Do you remember the #include "filename.as" AS2 directive? It was often used to include predefined prototype functions in AS2. Since using prototypes become obsolete in AS3 (in favour of the inheritance) the include in often underused.

For example, Darron Shall suggests using include directive to mimic multiple inheritance. Recently, I had been given a glimpse of brain damage enlightenment and I started using it again in AS3 for including all project specific libs only. If you want to pass me the hammer now, please read on.

How?

Using wildcards (like import flash.display.*) is often considered a bad practice (or laziness) as we don't know what classes/packages are actually being imported. So we are left with typing all import directives for every class we write. Very commonly we use the same shared functionality (either a framework or built-in classes) in the SWF. The idea is that instead of having to import the same classes in every project class, we can have a list of them in a file, i.e.:

import flash.display.Bitmap;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.utils.setTimeout;
import gs.TweenLite;

and then stop worrying anymore about what needs to be imported.

All you need to do is to place include "../../imports.as"; where your import directives would normally live. I've personally chosen to put it in the same location as the source directory.

package net.blog2t
{
    include "../../imports.as";

    public class Banner extends Sprite
    {
    }
}

Then you can do it for every project specific class you add.

If you're on OS X and using Textmate, you can use the shortcut – F5 key to sort lines and remove duplicated entries.

06:00 PM | | 2 Comments | Tags: , , ,
January 30, 10

Static Mirror installation for Hidden Door festival

I have a pleasure to announce that I am a part of the Hidden Door Festival - the event is happening during this weekend at Roxy Art Club, Edinburgh.

I got commissioned to make an interactive installation that I've called Static Mirror. So, if you're Edinburger – come along to see the exceptional maze full of art and bands performing live, otherwise just enjoy my piece on-line.

Hidden Door installation live

Click the image above to activate (webcam required.) There's a accompanying noise, so mute the sound if you are i.e. at work.
© 2010 Tomek Augustyn. All rights reserved.

If you're looking for a deeper meaning, please read the artist's statement.

Coming out of the underground club, Tomek brings the idea of interactive VJing into a gallery space by confronting visitors with the imagination they might have about themselves.
He asks the old question – “Do our bodies exist for real or are we just a bunch of particles bound together by invisible forces as a temporal form of expression?”
The answer could be found by observing the nature of static noise reflection – as long as you move, you are.

On a technical note, the piece uses my HiSlope (alpha) video processing engine (shortly available as open-source.)

You can also press '/' to play with the manual controls and '\' to view the stats for the camera.

06:11 PM | | 2 Comments | Tags: , , , , ,
Next → Page 1 of 6