Sunday, July 06, 2008

Changes of usage of _autoAlpha in Tweener AS3

This has to be a post I need to make to remind myself in the future. I almost wet my pants when I found my code to automatically hide an object invisibility, doesn’t work in AS3 anymore.
The usual code is like...

Tweener.addTween(myMC, {_autoAlpha:1,time:1,transition:"linear"})

in which there is no problem with the syntax. But upon searching through the vast sea of internet. This post at http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/2007-October/000293.html

enlighten my life that most of the special parameter that is not “official” will need an intialisation like :

import caurina.transitions.properties.DisplayShortcuts;
DisplayShortcuts.init();

Same, as the poster commented, hated to do these initialisation. But for the goodness sake of the API growth, it will help to keep the main API non-polluted, so to speak. My god.

Update : 8th July 2008
Got into more tips on using _Blur_blurX instead of the usual _blur_blurX now from this blog comment. And of course, you need to initalize your Tweener script once before using it.

import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();