H.264 GPU Decoding in Flash Player on Mac OS X is live [ by Thibault Imbert ]

We just pushed a few minutes ago a new version of the Flash Player 10.1.82.76 containing a nice feature that was in beta until now called “Gala”. Yes, H.264 GPU decoding in Mac OSX is now officially enabled in the Flash Player. You should notice now a nice difference when playing H.264 content on your [...]

New Two-Part Tutorial On AIR 2.0 NativeProcess

I recently uploaded a two-part tutorial that explains how to use the new NativeProcess API in Adobe AIR 2.0. With this API you can communicate with native code to get deeper access to the host operating system. In the first part, I create a command-line screenshot application using Visual Studio and C#. In part two, [...]

Event Handler Style Showdown

There has been some talk on Twitter recently about the best way to write an event handler. This is all in good fun of course as there is no right way to do any kind of code. Flashers come from all walks of life. Some are from the design world and some from serious development backgrounds. Below are some of the suggested ways. What do you think?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
private function kermanStyle(evt:Event):void {
    // this is nice but I don’t like evt for some
    // reason. Also it is much more readable and
    // clean to put the opening { on a new line.
}
       
private function sacksStyle(event:Event):void
{
    // Steven rightly puts the opening { on a new
    // line but uses the word event for his event
    // object. You should never use a lowercase
    // version of an existing class for an instance.
}
       
private function brimelowStyle(e:Event):void
{
    // Yeah baby that’s what I’m talking about!
    // Using e is short, succinct, and most of all
    // it is the sign of high intelligence.
}

Lee

New Video Tutorial on Android Camera Access

I just uploaded the second tutorial in the AIR for Android series. The latest build (07/05) on the prerelease site contains a ton of cool features including camera and microphone access, webview, and hardware acceleration. In this tutorial I show you how to get the device’s camera into your AIR application. Lee

MicRecorder, a tiny microphone library [ by Thibault Imbert ]

While working on the second chapter of “What can you do with bytes ?”, I came up with a tiny helper class for developers who need to record audio easily from the microphone in their applications. Here is MicRecorder, which handles internally the ByteArray work with the Event.SAMPLE_DATA event dispatched by the Microphone object introduced [...]

Flash Player 3D Future session at Max 2010 [ by Thibault Imbert ]

If you are into 3d development for games, augmented reality or just interactive stuff like websites, you just can’t miss the session entitled Flash Player 3D future scheduled for Max 2010 scheduled on October 27 at 11:00AM in room 503. Sebastian Marketsmueller (Flash Player engineer) will deep dive into the next generation 3D API coming [...]

Optimizing web content for Flash Player 10.1 [ by Thibault Imbert ]

Last week I did an e-seminar about best practices when developing for Flash Player 10.1. The idea was to cover the new stuff in Flash Player 10.1 in terms of memory, cpu and other optimizations. For those who already saw the session called “Designing and developing for the Multiscreen web” that I did at Max [...]

Introducing the MultiDraggable Touch API

Updates: I changed the name of the post as technically this is not a gesture API. It is a way to achieve gesture-like effects using touch data. Also the code below was missing an important line. You have to set the input mode to touch point in order for any of this to work.

As part of my multi-touch session at Flashbelt I introduced a new API for getting true multi-touch gestures in Flash. Windows 7 has a pretty big limitation when it comes to gestures as it is only capable of doing one at a time. Since Flash listens for these native events, we also get that limitation when doing multi-touch in Flash.

Tim Kukulski, who is a member of the Adobe XD team, has written a great set of classes that listens for raw touch events instead of the built-in gestures. The main class, called MultiDraggable, does all of the work for you and allows you to quickly add zoom, rotate, and drag gesture effects to any DisplayObject. See the video below for an example.

The code needed to implement the gesture effects is extremely simple. Below is a code snippet of how to do it. You simply add your DisplayObject to the display list of a MultiDraggable instance. Then add the MultiDraggable instance to the main display list.

1
2
3
4
5
6
7
8
9
10
import xd.parts.MultiDraggable;

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

// box is a MovieClip in the library
var b:MovieClip = new box();

var dragme:MultiDraggable = new MultiDraggable();
dragme.addChild(b);
addChild(dragme);

Big thanks to Tim for releasing this code. Photos and artwork in the video are from Ralph and Mario. Go ahead and download the files and have fun spawning multiple gestures!

Lee

Introducing the MultiDraggable Gesture API

As part of my multi-touch session at Flashbelt I introduced a new API for getting true multi-touch gestures in Flash. Windows 7 has a pretty big limitation when it comes to gestures as it is only capable of doing one at a time. Since Flash listens for these native events, we also get that limitation when doing multi-touch in Flash.

Tim Kukulski, who is a member of the Adobe XD team, has written a great set of classes that listens for raw touch events instead of the built-in gestures. The main class, called MultiDraggable, does all of the work for you and allows you to quickly add zoom, rotate, and drag gestures to any DisplayObject. See the video below for an example.

The code needed to implement the gesture effects is extremely simple. Below is a code snippet of how to do it. You simply add your DisplayObject to the display list of a MultiDraggable instance. Then add the MultiDraggable instance to the main display list.

1
2
3
4
5
6
7
8
import xd.parts.MultiDraggable;

// box is a MovieClip in the library
var b:MovieClip = new box();

var dragme:MultiDraggable = new MultiDraggable();
dragme.addChild(b);
addChild(dragme);

Big thanks to Tim for releasing this code. Photos and artwork in the video are from Ralph and Mario. Go ahead and download the files and have fun spawning multiple gestures!

Lee