Monthly Archives: January 2008

Why I won’t enter the eBay Flex widget contest

After reading about the eBay Flex widget contest over at Doug's blog and seeing eBay changing the contest rules, to allow the use of open-source code licensed under the MIT or BSD licenses, I got curious and went to the site. I registered, got the API access keys and tried a couple of samples they have for download. Just like Doug said: "thought maybe I’d whip something together and enter".

While I was brainstorming today with Bilou about possible things we could do, I went over to to read the FAQ again and saw this clause:

The eBay Developer Widget Build Off Contest 2008” (the “Contest”) is open to legal residents of the fifty United States, the District of Columbia, Canada (excluding the province of Quebec) or the UK;

Since we're in Portugal, I guess we won't be entering this contest anymore. That's bad, why not open the contest for other developers?

Update: Sunny Li, from eBay, was kind enough to reply to us saying that the reason only US, CA and UK are allowed into the contest is purely legal. You can check his response here.

getDefinitionByName

Imagine you have a .swc file that contains objects named from "mcObj0" to "mcObj11", and want to add those objects randomly to the screen. One way to do this would be:

A better approach is one that uses 'getDefinitionByName'. This method allows to create objects dinamically and results in less code written. That means we could refactor the above code into:

Look ma, only three lines, that's great! To use this method you also have to remember to add the compiler parameter "-include-libraries". Here is how to do it:

- In the project properties choose "ActionScript Compiler"

- On the "Additional compiler arguments" field add the following:

-include-libraries PATH_TO_SWC

The path should be the absolute path, relative won't work.

WOW meets Papervision3D

WOW was released today, in case you don't know what WOW is let me quote a little description from WOW: "WOW-Engine is a free AS3 open source physics engine written by Seraf ( Jérôme Birembaut ) capable to handle positions in a 3D environment."

We've all been waiting for this moment for a very long time, to have physics
and 3D come together, so without further due here's a little demo I've thrown together in an hour or so.

The code will follow shortly, I just need to tidy it up :) .

demo

Enjoy.

Customized actions for FLVPlayback Component

If you need a standard flash videoplayer, then the FLVPlayback component is the right thing for you.

Just create a new FLA and drag&drop a FVLPlayback component from the components library into a movieclip in your library, export it for actionscript and compile the SWC.

All the functionallity stuff is already handled by adobe. But that's where I got stuck for quite some
time. I needed a player, that used the forwardButton and backButton for switching the videos (and not seeking forward and back).

The answer was really simple: Just override the functions once the component loaded its skin:



Minimal component set

I've been doing a lot of forms lately and that, as you most likely know, it's hard boring work. Always fighting your way through components and the woes of skins.

So I set out to find and easier of doing things and found it over at Keith Peters blog bit-101, it's best two features that will save you the hassle of always having to create component, addChild, set x position, set y position, you can do it all in one line. Components that fire events such as click or change, also take a fourth parameter of defaultHandler and that also saves the addEventListener.

So be sure to check them out at: bit-101 blog or download source here.

As3Crypto

This is a bit of old news as the latest version of AS3Crypto came out in November, but I've only had the time to post about it now.

So what is As3Crypto? Well it's the Swiss Knife of AS3 Cryptography, I've been using it for a while now to manage secure communications for highscores and other sensitive data.

And guess what, a new version just (in November) came out, with support for TLS! Yes TLS in AS3, also version 1.3 has a lot of new improvements ( check the list ).

So to wrap things up, I prefer to use AS3Crypto over Adobe's crypto library because it has more features, a nice wrapper class and from my experience it's usually faster. Be sure to check out this great tool to check if your encryption is working well.

Expect a tutorial on how to use it with PHP soon ;)

AS3 Tweener engines, GOASAP and Adobe.

Recently Moses Gunesh has introduced Go:Â "a generic set of base classes that should support many kinds of animation systems".

This strucks me as great news as in the past I used FUSE2 and when I moved to AS3 I found myself looking for a similar alternative but not really finding one as good or widely accepted as FUSE2.
The I came across Tweener, and that's what i currently use to power all my projects, it's simple, lightweight and most important easy to use.

Normally this would be the end of the story for me, but somehow Tweener is lacking some funcionalities that would like so i moved to Boostworthy's engine and again I found myself lacking some of the things i had in Tweener. So I kept searching and found Go, that altough it's not an Engine per se allows me to have all the functionality I want by extending it.

Also i found a great tool to ease my decision, and yours, Moses's TweenBencher. It's a great tool to test out all the different Tweener and see their advantages and disavantages. Be sure to check it out.

But most importantly I came across Moses's proposal to Adobe for a Core Animation Library and after reading it I must say that I agree with it to it's full extent. So be sure to check it out, and to make your voice heard if you agree, or not, with it.