Posted by Sankar.G | Posted in AS3 | Posted on 10:10 AM
we can do tween action in action script 3.0
code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
b1_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(e:Event)
{
var a:Tween=new Tween(movie_mc,"rotation",Strong.easeOut,0,100,5,true);
}
before we want to tween we want to add some library in flash
so import tween & easing and declare a variable a and set Tween
movie_mc = movie clip name
rotation = which action we want to do (for ex):"x","alpha","y" we can put these functions
0=starting from zero axis
100=end to 100 axis
5=seconds to finish the rotation
code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
b1_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(e:Event)
{
var a:Tween=new Tween(movie_mc,"rotation",Strong.easeOut,0,100,5,true);
}
before we want to tween we want to add some library in flash
so import tween & easing and declare a variable a and set Tween
movie_mc = movie clip name
rotation = which action we want to do (for ex):"x","alpha","y" we can put these functions
0=starting from zero axis
100=end to 100 axis
5=seconds to finish the rotation
hi,
Nice one....good tutorial..