[Tweener] New stable version: 1.26.62, new unstable version: 1.31.66

Zeh Fernando zisforzeh at gmail.com
Sat Oct 6 20:17:12 PDT 2007


Hi list,

Last week, I've uploaded the latest stable version of Tweener to the 
project website, bringing the current stable version to 1.26.62:

http://code.google.com/p/tweener/downloads/list

This version basically adds better error handling by way of onError and 
add a nifty "inheritance" parameter to new tweenings, "base". More 
information about them on the documentation:

http://hosted.zeh.com.br/tweener/docs/en-us/

Both features have been added by Arthur Debert.

More important than that, however, is that just now, I've uploaded the 
new /new/ version - 1.31.66 - to the subversion repository:

http://code.google.com/p/tweener/source

This is the currently "test" version and should be considered a beta.

This version will probably available as a zip download from the normal 
project site on a couple of weeks. However, this version features some 
significant changes to the code, as I pointed out previously on this list:

http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/2007-August/000200.html

Those might break old code - so I'd like to take this moment to point 
what has changed on the this version.

(You can just see the changelog here if this is too long though:
http://code.google.com/p/tweener/wiki/Changelog )

------------8<------------8<------------

1: DOCUMENTATION EXISTS

I've also uploaded the new documentation *to the repository*. This means 
that, as odd as it sounds, the documentation featured on the repository 
is complete. It has description and examples on all existing methods, 
parameters, and a full listing of all properties available. This 
documentation is not on the online website listed above yet though. The 
reason is, there are differences between the stable and beta version, so 
if I upload the new documentation now, there will be conflicts between 
what's said there and how the current Tweener version actually works.

------------8<------------8<------------

2: SPECIAL-PROPERTIES-DEFAULT IS KAPUT

Like I said before, Special properties have been moved to optional 
classes. "Special properties" are like proxy properties that did little 
tricks to circumvent some of Actionscript's limitations, and allowed you 
to tween stuff like _frame, _sound_volume, _blur_blruX, and stuff like 
that. Well, until now, Tweener created a few special properties by 
default, on the "SpecialPropertiesDefault.as" class.

That's not the case anymore. Instead, Tweener decided to walk back to 
its more abstractive roots. There's no SpecialPropertiesDefault class 
anymore, and no special property is registered by default. It's just a 
simple tweening engine.

This change has no impact on performance. However, code is slightly 
smaller; Tweener now takes around 8.7kb of an SWF. This will change in 
the future, though (for less!) as it's a beta and there's some code 
redundancy that needs to be addressed. The real reason for the change 
was to have a cleaner solution API though.

Anyhow. The old special properties aren't gone though. Because Special 
Properties were always a separate thing anyhow, the existing special 
properties were split into different classes that can now be used when 
desired. You just have to import and init() the class.

For example, the "_autoAlpha" (alpha/_alpha with auto-invisible when 0) 
would be used like this (AS2/AS3)

Tweener.addTween(mymc, {_autoAlpha:0, time:1});

Now it's like this:

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

Tweener.addTween(mymc, {_autoAlpha:0, time:1});

It's important to remember that import/init() only has to be done once, 
then it's always available.

Personally, I hate any kind of "initialization". I like my code simple 
and straightforward. However, the optional importing and registration of 
additional special property classes is what will allow Tweener to grow 
on any direction without getting an API that's very polluted.

One important side effect of this change is that it allows us to have a 
bunch of different special property classes - think of them as plugins 
or modules - so people who want them will use them. I've added a bunch 
of new features on them. These are the special property classes 
availables now:

ColorShortcuts.as - color stuff
CurveModifiers.as - curve modifiers (_bezier for now)
DisplayShortcuts.as - display shortcut/helpers
FilterShortcuts.as - filter shortcuts
SoundShortcuts.as - sound shortcuts (volume, pan)
TextShortcuts.as - text shortcuts

More on them below.

------------8<------------8<------------

3: .USEFRAMES WORKS

The parameter .useFrames is probably one of the first features I added 
to Tweener. It never worked though. Now it does. What it means is that 
you can control a tweening time/delay by number of frames. The 
/computacional performance/ is the same as a normal time-controlled 
tween, but because you'll be bound to the flash player frame execution 
and not the current execution time, the /visual performance/ will never 
be as accurate as the standard time control. So it's not recommended. 
But it's there.

------------8<------------8<------------

4: WARNINGS WHEN TRYING TO TWEEN UNDEFINED STUFF

If you try to tween a property that doesn't exist (say, "y" in AS2), 
Tweener will warn you via an error message. This is also to help easen 
the transition from the old version to the new one, as some properties 
such as _autoAlpha can fail silently on AS2 if the proper class is not 
initialized.

------------8<------------8<------------

5: EVENTS HAVE SCOPES

Parameters onStartScope, onUpdateScope, onCompleteScope, and 
onErrorScope have been added. So you can have your events ran anywhere 
and even 'simulate' AS3-style listeners without delegates or other crazy 
stuff.

------------8<------------8<------------

6: SPECIAL PROPERTIES: FILTERS

Tweening for almost all properties of all filters have been added (the 
only one not available are some pretty advanced stuff, like if you're 
trying to tween the matrix of a convolution filter, array of colors of 
gradientbevelfilter, etc). Please see the documentation on the 
subversion repository for details.

No filters are available in Flash Lite 2/3 and Flash 7.

------------8<------------8<------------

7: SPECIAL PROPERTIES: DISPLAY STUFF

Basically, special properties for easy tweening of scrollrect has been 
added. Scrollrect is a nice little beast, but don't try to use it if you 
need precise (float) masking, it can only operate on round pixels.

Scrollrect is not available in Flash Lite 2/3 and Flash 7.

------------8<------------8<------------

8: SPECIAL PROPERTIES: COLOR STUFF

Some issues about colorTransform and legacy color transformation 
properties have been resolved. Now proper AS2/AS3 color transformation 
properties are supported.

It also features hue, saturation (with or without luminosity balance), 
contrast and brightness (both overexposure and tinting) special properties.

Hue and contrast are not available in Flash Lite 2/3 and Flash 7.

------------8<------------8<------------

9: SPECIAL PROPERTIES: TEXT STUFF

Properties for tweening of textformat properties have been added. I've 
also added one little "_text" special property that replaces a 
textfield's text with another string.

------------8<------------8<------------

That's pretty much all. A few additional things:

A. I'll have downloadable examples of most new features/properties soon.

B. This version has some optimizations done and things are around 10% 
faster (of course any difference will only be noticeable if you're using 
something that requires way too many tweenings). However, there's a lot 
of things I see I have to change on the code now - basically moving 
auxiliary stuff to their own classes, and having a better special 
property support - so it'll probably be slightly faster and easier to 
extend in the future.

C. I don't like (most) special properties. There, I said. I mean, 
there's cool stuff like _text, and filters work now, it's all modular 
and based on the same functions, but really, having to write proxy 
functions for things that are already available as numeric properties 
(say, properties of filters) is like the icing in a cake made of bad 
design. There's a different approach for a more abstractive syntax that 
I'll try in the future, so for now, while stuff like "filter shortcuts" 
work, please don't think they're the perfect solution, be it with 
Tweener or anything else. They're just a stopgap - "what's possible". 
Also because we'll soon have the need to tween properties of many random 
filters due to the AIF/Hydra thing (\o/) a real solution is needed for 
those crazy actionscript properties that don't auto-update.

D. There's a lot of stuff in the queue yet. It's odd that something so 
'small' can have so much stuff to be added or polished or redone. But 
the way I see it, Tweener is the main tool that I use on my own work, 
and it's the SPINE of every thing that goes on on what I build, so for 
me it makes sense to rethink stuff from time to time.

Ok, that's all (really, now).

Thanks.

Now I can play TF2.


Zeh


More information about the Tweener mailing list