Archive for

December, 2008

...

Creating custom events

Events are like one of the key elements in AS3. They create an environment where objects really have an relation to each-other. When I started working and learning actionscript 3, i quite quick know how to use them on the API default library. Especially the Event and MouseEvent are must-haves in basic flash applications. More: Read the rest of this entry...

Dutch zipcode validation

Here is a validation for a dutch zip code. Since I haven't found it on the internet I thought lets share it. This script accepts two formats:

"0000XX" or "0000 XX" will return TRUE

anything else will return FALSE

 
public static function zipCode(code:String):Boolean {
    var zipExpression:RegExp = /^\d{4} ?\w{2}$/;
    return zipExpression.test(code);
}

CourierTube

This script loads a FLV video file, and draws it with the monospace courier font. Rendering happens on the flow.

Check it out here.

picture-61

Ziggo snowball fight

Ziggo is the biggest cable-company in the Netherlands. The game is about a backyard snowball fight. The game is developed in ActionScript 3 with a PHP/MySQl backend. Play it here.

Ziggo snowball fight

Client:

Compile flash online

With the Flex SDK out, were no longer restricted to use the Flash IDE to compile ActionScript. So i thought, what can I do with that? I don't need another environment for my AS other than Flex Builder. So I thought, why not on-line? Compile actionscript in your browser! So I went working on it, and actually its very very easy. It just needs like 4 lines of PHP and the Flex SDK on your server.

Source is available here: flexphp

Mr.Doob: Be aware of some scurety issus, like using ExternalInterface for bad, or doing embed[""] of files in the server... stuff like that...

As you can see its really simple. Just point to the sdk folder and the AS file. Only thing that remains is getting the chmod right.