|
-
OOP is one letter from OOPS
Will also work for your other clips. As long as they are all going to use the same timings, then this should be fine:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var yellowTween:Tween = new Tween (pics_mc.yellow_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
yellowTween.stop();
yellowTween.addEventListener(TweenEvent.MOTION_FIN ISH,fadeOut);
if (pics_mc.numChildren > 1) {
for (var c:int = pics_mc.numChildren-1; c>=0; c--) {
var clip:Object = pics_mc.getChildAt(c);
clip.alpha = 0;
if (c > 0) {
clip.nextClip = pics_mc.getChildAt(c-1);
} else {
clip.nextClip = pics_mc.getChildAt(pics_mc.numChildren-1);
}
trace (pics_mc.getChildAt(c).name)
trace (clip.nextClip.name)
}
}
yellowTween.start();
function fadeOut(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION _FINISH, fadeOut);
event.target.addEventListener(TweenEvent.MOTION_FI NISH, startNext);
event.target.begin = 1;
event.target.finish = 0;
event.target.start();
}
function startNext(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION _FINISH, startNext);
event.target.addEventListener(TweenEvent.MOTION_FI NISH, fadeOut);
event.target.obj = event.target.obj.nextClip;
event.target.begin = 0;
event.target.finish = 1;
event.target.start();
}
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|