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();

4 comments:

Anonymous said...

I'm slowly getting annoyed by the changes in Tweener which are not described in the Documentation too ;)

Cheers,
FLAIM

m said...

Same here, i might consider a switch to Tweenlite directly if it's not for the support of Papervision with Tweener. I'm really irritated by the non-standard way of Tweenlite is hosting its file on a non-google server.

Salutes,
Mervin

Luke Munn said...

Yo peeps this has been in the documentation for a looong time I believe. I've got no affiliation with the Tweener people, but I found it very easy to use the Special properties, and I'm still somewhat new to AS3 and extension classes like Tweener.

Anonymous said...

thank you for your blog post. It helped me to find the cure ;)