Return to Snippet

Revision: 12753
at March 26, 2009 13:18 by allnatural


Updated Code
//Simple Tween
Tweener.addTween(myTextField, {_y:200, time:0.7, transition:"linear"});


// Using events to fade out then disappear (anonymous in-line function)
Tweener.addTween(myMovieClip, {alpha:0, time:1, onComplete:function() { this._visible = false; }});


// Using events to fade out then disappear (using the _autoAlpha special property)
Tweener.addTween(myMovieClip, {_autoAlpha:0, time:1});


// Complex Tweening
fGo = function() { trace ("I'll go!"); };
fGoing = function() { trace ("I'm going!"); };
fGone = function() { trace ("I'm gone!"); };
Tweener.addTween(myMovieClip, {alpha:0, time:1, onStart:fGo, onUpdate:fGoing, onComplete:fGone});


// Using other special properties (that are not related to a variable/property)
Tweener.addTween(mySoundObject, {_sound_volume:100, time:1});
Tweener.addTween(myMovieClip, {_frame:10, time:2.5});


// Using tweener 'templates'
var fadeIn:Object = {alpha:100, time:1};
Tweener.addTween(myMovieClip, fadeIn);

Revision: 12752
at March 26, 2009 13:16 by allnatural


Initial Code
//Simple Tween
Tweener.addTween(myTextField, {_y:200, time:0.7, transition:"linear"});


// Using events to fade out then disappear (anonymous in-line function)
Tweener.addTween(myMovieClip, {_alpha:0, time:1, onComplete:function() { this._visible = false; }});


// Using events to fade out then disappear (using the _autoAlpha special property)
Tweener.addTween(myMovieClip, {_autoAlpha:0, time:1});


// Complex Tweening
fGo = function() { trace ("I'll go!"); };
fGoing = function() { trace ("I'm going!"); };
fGone = function() { trace ("I'm gone!"); };
Tweener.addTween(myMovieClip, {_alpha:0, time:1, onStart:fGo, onUpdate:fGoing, onComplete:fGone});


// Using other special properties (that are not related to a variable/property)
Tweener.addTween(mySoundObject, {_sound_volume:100, time:1});
Tweener.addTween(myMovieClip, {_frame:10, time:2.5});


// Using tweener 'templates'
var fadeIn:Object = {_alpha:100, time:1};
Tweener.addTween(myMovieClip, fadeIn);

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

Initial Description
Simple Tweener Examples

Initial Title
Tweener Examples

Initial Tags

                                

Initial Language
ActionScript 3