Flash Tween Class Code as2 and as3

I use this code over and over, and always have to look for it to make sure I am entering it correctly. 

Action Script 2

import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(mc_name, "_alpha", Strong.easeIn, 100, 0, 3, true);

Action Script 3

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

var myTweenName:Tween = new Tween(mc_name, "alpha", Strong.easeOut, 0, 100, 5, true);


Remember to change myTweenName if you use this more than once in your movie.

the only thing you need to remember to do is name your movie clip and then change it in the mc_name. Make sure they match.

Popularity: 37% [?]

line
Graphicmuse Design copyright 2009