Download the FLA file
This script will allow you to use actionscript to animate content, buttons, pretty much anything you want to change in size, using actionscript. this actionscript that sets the parameters of the tween:
function Fade(mc, alpha) { var type = mx.transitions.easing.Regular .easeInOut var start = mc._alpha var end = alpha var time = 20 tabmove = new mx.transitions.Tween(mc, "_alpha", type, start, end, time, false); }
What does that mean? light blue text: Type of Easing (other options:Back, Elastic, Strong, Bounce all are case sensitive)green Text: When to Ease(other options:EaseIn, EaseOut all are case sensitive)Blue Text: amount of frames the tween will take Then to make the Object move use this actionscript, on the actions layers
Fade(instancename ,100 );
What does that mean? light blue text: the instance name of the movieclip you are fadinggreen Text: what opacity you want it to be at the end of the tween(so 100=100%, 50=50% etc) you may also put it into an onRollOver event, or an onRelease event:
button .onRelease = function(){ Fade(instancename,100); }
What does that mean? light blue text: the instance name of the butttongreen Text: the event (other options:onRollOver, onRollOut, onPress, etc.)
Back to tutorials
Sponsored Link