Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Knowledgebase
Combination Tweens With The Tween Class  

Download

Actionscript

import mx.transitions.Tween;
import mx.transitions.easing.*;

var RotateT:Tween = new Tween(my_mc, "_rotation", Strong.easeOut, 0, 720, 5, true);
var xScaleT:Tween = new Tween(my_mc, "_xscale", Strong.easeOut, 100, 0, 5, true);
var yscaleT:Tween = new Tween(my_mc, "_yscale", Strong.easeOut, 100, 0, 5, true);
var alphaT:Tween = new Tween(my_mc, "_alpha", Regular.easeOut, 100, 0, 5, true);


Note: Press the "refresh" button in the browser to play the animation again.


The tween transition class is imported.


import mx.transitions.Tween;

All the easing transitions are imported to the ........

import mx.transitions.easing.*;

A new tween is contructed named "xPositionT" and defined using the tween class syntax:
Tween (object name, property, ease class, ,,,).

var RotateT:Tween = new Tween(my_mc, "_rotation", Elastic.easeOut, 0, 360, 4, true);

var RotateT:Tween = new Tween(my_mc, "_rotation", Strong.easeOut, 0, 720, 5, true);

var xScaleT:Tween = new Tween(my_mc, "_xscale", Strong.easeOut, 100, 0, 5, true);

var yscaleT:Tween = new Tween(my_mc, "_yscale", Strong.easeOut, 100, 0, 5, true);

var alphaT:Tween = new Tween(my_mc, "_alpha", Regular.easeOut, 100, 0, 5, true);



© 2008 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us