[Golist] Go Tween Library, new example
Karsten Goetz
KarstenGoetz at web.de
Sun Mar 9 05:41:45 PDT 2008
Hi there,
last month I post an idea for a tween library structure for "go-tweens".
Now I post some classes and would like to know from you if that is a
good idea and maybe could work for a library anyone can quickly use,
expand and share tweens.
I have not tested it yet with sequencing and performance.
Here some code form the example to show how parameters are passed
// pre-define parameters with the value objects. can be usefull if
there are a lot of parameters or for often used animation settings
var startFormatVo : TextFormatVO = new TextFormatVO();
startFormatVo.size = 1;
startFormatVo.letterSpacing = 50;
startFormatVo.leading = 10;
var endFormatVo : TextFormatVO = new TextFormatVO();
endFormatVo.size = 25;
endFormatVo.letterSpacing = 3;
endFormatVo.leading = 15;
group = new PlayableGroup();
// if startvalue is null, the tween takes the instance parameters
group.addChild(new ClipTween(textField, null, {alpha:1}, 0, .4,
Linear.easeIn));
// start and endvalues as objects, most common and quick use...
group.addChild(new ClipTween(textField, {y:200}, {y:50}, 0, 1,
Bounce.easeOut));
// start and endvalues predefined with value objects
group.addChild(new TextFormatTween(textField, startFormatVo,
endFormatVo, 0, 1, Bounce.easeOut));
// start defined inline with the value object, endvalue defined
with a DropShadowFilter ( returned from the function endFilter() ).
Only the tweenable values of the valueobject will be used
group.addChild(new DropShadowTween(textField, new DropShadowVO(10,
50, 0x000000, 1, 50, 45, 20), endFilter(), 0, 1, Linear.easeNone));
It's build upon Moses Tween-example plus ValueObject classes to
define the tweenable parameters.
Try the example and let me know what you think...
Ehm, and can anybody tell me how to answer to a specific post. I only
can open a new thread via golist at goasap.org - hm, i know it's
easy...:-)
Greetings!
karsten

------------------------
Karsten Goetz
Flashprogrammierung
Bernstorffstr. 120
22767 Hamburg
Tel: +49 40 43 09 91 07
Mobil: 0173 57 14 984
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080309/2f006e37/attachment-0002.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classes.zip
Type: application/zip
Size: 207607 bytes
Desc: not available
Url : http://goasap.org/pipermail/golist_goasap.org/attachments/20080309/2f006e37/attachment-0001.zip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080309/2f006e37/attachment-0003.html
More information about the GoList
mailing list