Monday, February 26, 2007

import caurina.transitions.Tweener;

Here are some basic examples using the new Tweener class. I like how things are defined and dataTyped out. All and all, I think it makes more sense than mcTween does. It will just take some time to get used to the new syntax.

import caurina.transitions.Tweener;

this.eric_mc.onRollOver = function() {
Tweener.addTween(this, {_xscale:170, _yscale:170, time:1, transition:"easeoutelastic"});
};

this.eric_mc.onRollOut = this.b1.onReleaseOutside = function() {
Tweener.addTween(this, {_xscale:100, _yscale:100, time:1, transition:"easeoutelastic"});
};

this.amanda_mc.onRollOver = function() {
Tweener.addTween(this, {_xscale:120, _yscale:120, _rotation:10, time:1});
};

this.amanda_mc.onRollOut = this.b2.onReleaseOutside = function() {
Tweener.addTween(this, {_xscale:100, _yscale:100, _rotation:0, time:1});
};

More to come as I learn more about this class.


4 Comments:

Blogger KayJay said...

Instead of explicitly stating values for the tween can you give it variables instead? So instead of having, say, duration:2 can you use duration:durationLength ?

8/02/2007 4:57 AM  
Anonymous freezing said...

your code seems actionscript 2 ...

any examples for as 3 please

1/17/2008 7:07 AM  
Blogger Aloha Hands said...

... right; I was hoping for AS3 examples. I'll keep looking... Thanks for your post.

1/25/2008 1:43 PM  
Anonymous Anonymous said...

Do a google search on the Caurina package you'll find some cheat sheets that describe every type of transition and type. As far as fabricating durations and events thats just a matter of manipulating the variables which would be standard for AS, setting constants and randoms.

7/11/2008 10:15 AM  

Post a Comment

Links to this post:

Create a Link

<< Home