Archive for ActionScript 3

More fun with Azoth: “Sierpinski Yourself”

You need a webcam to enjoy this blogpost to the fullest This post is a brief addendum of my previous post about Azoth. I was so excited about Azoth’s performance in my previous post that I didn’t take enough time to come up with a more practical example. Like I said last time, ByteArray operations [...]

Supercharge your ByteArray operations using Azoth

(edit: take a look at my next blogpost for more fun with Azoth !) I recently came across an interesting use of Adobe’s Alchemy technology. Basically what Alchemy allows you to do is run compiled c/c++ code inside of the ActionScript Virtual Machine. This in turn allows you to implement low-level optimizations that can lead [...]

Encoding a GIF from webcam snapshots with Flex Hero 4.5

As a Flash/Flex developer, I was very dissappointed when I found out Flash and Flex can’t handle GIF (Graphics Interchange Format) files. Untill I came across Thibault Imbert’s work ! He wrote an easy to use GIF Player & Encoder class in ActionScript 3. We’ll be creating a Flex application that uses Thibault Imbert’s classes [...]

Flash Packager for iPhone: Using the Geolocation class

Prerequisites: – an iOS device. – Flash professional CS5 – an iPhone dev. license/certificate that allows you to package flash and deploy on iOs. After playing around with the flash packager for iPhone that ships with Flash CS5, I thought I’d share some information about one of the most interesting aspects of mobile development: Location [...]

Adding swipe gestures to your mobile Flex application

With the Flex 4.5 SDK (aka Hero) you can now create some very nifty mobile applications to run on Android enabled devices as well as on the BlackBerry PlayBook. Now, one of the features you’ll use on any touch enabled device is the swipe gesture. You can use this gesture to move things around or [...]

drawing a perfect circle with the curveTo function.

I’m guessing most of you already know what the graphics.curveTo function is. As the name suggests, it allows you to draw a curved line that starts at a certain point, bends towards a control point, and ends in an anchor point. The starting point of the curve can be defined in three ways: undefined: the [...]

the Monty Hall problem: A programmer’s approach

I’ve always enjoyed mindgames, but there was always one riddle that I just couldn’t wrap my head around. You may or may not have heard about the Monty Hall problem: Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a sportscar; behind the others, goats. You [...]

estimating the duration of a Sound Object while loading.

In case you never used the Sound class before, let me give you a brief introduction. The Sound class is found in the flash.media package and is used (hard not to be obvious here) for playing sounds. The constructor for the Sound class has 2 optional parameters: stream:URLRequest = new URLRequest(“url:String“); context:SoundLoaderContext = new SoundLoaderContext(“buffertime:Number” [...]

Flash Player 10.1 and AIR 2 released

Adobe has released a new version for their 2 runtimes, Flash Player and AIR. Naturally, with those releases come new and improved features as well. Let’s take a look at what makes it worth to upgrade to the next version. Let’s start with the new Flash Player. You can download it here and it’s finally [...]

3D rotation at runtime with 2 lines of code

In the weeks before my workshop at Multi-mania (getting up to speed with native 3D) I spend a lot of time experimenting with some new api’s. One thing that I kinda needed from the start is a decent rotation class to rotate an object in 3D (at runtime). So I set off and create 2 [...]