Yes sorry, to clarify each item in the string is an MC, I want to tween the alpha of the MC’s in the array. I made an array because there are 26 MC’s that need to be tweened for 26 buttons. SO I just want to make a function that I can call that simply fades them all out then fades in the one I need.
But of course, you actually knew what I meant so ya.
First off that code throws up errors, I have caurina installed.
Secondly inputing a whole other class for this simple feature is probably not needed. Does anyone know how to do it with Fuse, OR how to do it with simple mx transitions?
/*
the following AS3 code hides the array on mouse down, and shows the array on mouse up.
I've also added a .1 delay increment, so they hide and show in succession.
*/
stop();
import gs.TweenMax;
var myArray:Array = [mc1,mc2,mc3];
function hideClips(event:MouseEvent):void{
TweenMax.allTo(myArray, .2, {autoAlpha:0, delayIncrement:.1});
}
function showClips(event:MouseEvent):void{
TweenMax.allTo(myArray, .2, {autoAlpha:1, delayIncrement:.1});
}
stage.addEventListener(MouseEvent.MOUSE_DOWN, hideClips, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, showClips, false, 0, true);
yea make sure your array of movie clips aren’t in quotes like you have them. Right now you have them set as strings.
do them as a sequence:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts,PennerEasing);
var clipArray:Array = new Array(clip0, clip1, clip2);
var hideClips:Fuse = new Fuse();
for (var i = 0; i < clipArray.length; i++) {
hideClips.push({target:clipArray*, alpha:0, time:.25, ease:"easeInQuad"});
hideClips.start();
}
or all at the same time:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts,PennerEasing);
var clipArray:Array = new Array(clip0, clip1, clip2);
var hideClips:Fuse = new Fuse();
for (var i = 0; i < clipArray.length; i++) {
clipArray*.alphaTo(0,0.5,"easeOutExpo");
}