Flash AS animation
Out of context: Reply #15
- Started
- Last post
- 23 Responses
- MadFlea0
Speaking personally from a designer's perspective, all I want is a simple function that will tween whatever I choose. I don't want to spend the time trying to understand classes and prototypes or using countless frame loops. After studying Penner and looking over Actionscript.org's tute on built in MX classes, I finally have what I want with some adaptation of the tute's code:
function tweenIt(mc,MCproperty,easeType,b... {
var end = begin+changeValue;
allTween = new mx.transitions.Tween(mc, MCproperty, easeType, begin, end, time);
}You can attach it to a button or acitivate it anyway you like:
myButton.onRelease = function() {
cR=-90;
t=120
tweenIt('myMC,'_rotation',mx.tra...
};I just tell it to start and it does the tween I told it to on the property I want without knowing a thing about classes or prototypes. Not an original script I'm sure, but if fyou want to tween something without too much studying, use what's built in to Flash. This is one way to do it. All purpose and plug-in play.