View Full Version : fade in and out

Kris Jones
06-28-2007, 05:41 PM
hi, is there a way of getting my content on screen to fade out whether a menu buttons is pressed, i then want the new information to fade in into its place. the only way i can think of doing it would mean that it only work if you pressed menu buttons in order but i want it so that it works whatever button u press, oh i also dont want to have millons of tweens on the timeline.thanks

06-29-2007, 07:39 PM
import mx.transitions.Tween;
import mx.transitions.easing.*;

targetMc._alpha = 100;
otherTargetMc._alpha = 0;

yourbtn.onRelease = function() {
var tw:Tween = new Tween(targetMc, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1, true);
tw.onMotionFinished = function() {
var tw2:Tween = new Tween(otherTargetMc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 1, true);