Share Posted November 2, 2009 Best if you just look. I have an array of clips I need to stagger, but there's one I need to dynamically pick to exclude. function vid_btn_click(e:Event):void { for (var v:uint = 0; v videoButtons[v].mouseEnabled = false; if (videoButtons[v] != e.target) { TweenLite.to(videoButtons[v], .7, {alpha:0, x:"-200", ease:Cubic.easeOut}); // TweenMax.allTo(videoButtons[v], .7, {alpha:0, x:"-200", ease:Cubic.easeOut}, .2); doesn't work } } } I don't have to stagger them, but I would like to. Does anyone know a way to make it happen? Link to comment Share on other sites More sharing options...
Share Posted November 2, 2009 allTo() expects an Array as the first parameter - you were passing a single object. Either of these two ways should work: function vid_btn_click(e:Event):void { var others:Array = []; for (var v:uint = 0; v videoButtons[v].mouseEnabled = false; if (videoButtons[v] != e.target) { others.push(videoButtons[v]); } } TweenMax.allTo(others, .7, {alpha:0, x:"-200", ease:Cubic.easeOut}, 0.2); } -or- function vid_btn_click(e:Event):void { var count:uint = 0; for (var v:uint = 0; v videoButtons[v].mouseEnabled = false; if (videoButtons[v] != e.target) { count++; TweenMax.to(videoButtons[v], 0.7, {alpha:0, x:"-200", ease:Cubic.easeOut, delay:count * 0.2}); } } } Link to comment Share on other sites More sharing options...
Author Share Posted November 4, 2009 Ahhh... giving that a try! Link to comment Share on other sites More sharing options...
Author Share Posted November 12, 2009 First option worked like a charm. TY. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now