AS3 scroller reference

Below you can find a quick reference for creating an AS3 scroller.
The example shows a simple (though spaghetti coded) way to create a fluid and functional AS3 scroller.

DOWNLOAD – AS3 scroller reference (20 KB)

This blog post is manly done for self-reference reasons. There are a lot of other Flash blogs and tutorial sites that deal with flash scrollers. This is just one solution that I happen to use quite frequently.

Chances are that if you create Flash content, you stumbled upon scrollers.
The problem is, while scrollers aren’t that hard to do, there are quite a few ways to create them, and the most obvious solution to do them, may not be the best way (I’m talking to you start- and stopDrag functions).
This is a best practice solution for creating scrollers. It relies on the MouseEvent.MOUSE_MOVE Event to render. The big advantage compared to a scroller using the Event.ENTER_FRAME event is that it renders a lot quicker since mouse events are able to render between frames.

Changelog:
– I updated the scroller reference to be a little more OOP friendly.

Click on the Image to open the example:
Scroller image

DoConvert v0.70 – String to Object converter

Easily convert Strings to Objects (or Arrays) with DoConvert.

DOWNLOAD – DoConvert v0.70 (52 KB)

The Library allows you to parse any String formatted in the short Array or Object syntax.
Any given datatype within the String will be converted to its logical ActionScript 3 pendant (i.e. {a:true, b:50}, the value a will be typed Boolen. The value b, uint).

example:
DoConvert code example

Yes, I know. It’s kinda like JSON ;).

Changelog:
v0.6

  • Removed a bug in the StringToObject.as and DoGesture.as, that prevented DoConvert to parse Strings including breaks and/or tabs.
  • Various code optimizations.

v0.62

  • Removed the NaN compiler error.
  • Various code optimizations.

v0.70

  • Added Actionscript 2 version.
  • Reduced Filesize by removing the classes ToArray.as, ToObject.as and Type.as.
  • Various code optimizations.

New Year, new language.

First of all: Happy new Year everyone.

I had a lot of fun updating and tweaking my blog in 2009, and I still plan on extending it in 2010.Especially the response to DoGesture blew me away.

Some of you may have noticed a new contact form, and other subtle changes to the blog (I secretly updated the whole backend framework to a new version of DoSite, which I also plan to release in the next couple of weeks).

The important change however, is the blog language. From now on every new post on this blog is going to be in English. Naturally I’m also going to change every other part of the Website that is still German.

The whole translation process may take some time, so please be patient with me (time is always rare).

Anyway, I wish all of you a happy and successfull 2010.

DoGesture v1.02

DoGesture v1.02 steht nun zum download bereit.

DOWNLOAD – DoGesture v1.02 (180 KB)

DoGesture ist ein Framework zur Interpretation von Gesten. Die neuste Version von DoGesture macht es möglich Mausgesten sowie Objekt Bewegungen abzufragen.

Somit können mit DoGesture nun Gesten mit verschiedenen Objekten erstellt werden, das erfassen von Multitouch Interfaces ist somit möglich!

Ein einfaches Beispiel einer Multitouch Applikation:

DoGesture

Eine Demonstation der Mausgesten Interpretation:

DoGesture

DoGesture v1.01

DoGesture v1.01 steht nun zum download bereit.

DOWNLOAD – DoGesture v1.01 (172 KB)

Version 1.01 von DoGesture behebt einen Bug, der verursachte das dass „GestureEvent.GESTURE_COMPLETE“ Event ausgelöst wurde bevor die Geste abgeschlossen war.

Dies ist immer dann passiert wenn die Geste einmal komplett ausgeführt wurde. Der User konnte daraufhin dass Event nochmals auslösen indem er auf das übergebene DisplayObject geklickt hat.

An dieser Stelle ein Dankeschön an „ cerupcat“ aus dem Kirupa Forum, der den Bug gefunden und behoben hat.

DoGesture