Jump to content
Search Community

oh please help building a simple slideshow

rikbogusz test
Moderator Tag

Recommended Posts

oh, someone, hellp please? i've been awake for nearly 3 days, finishing building a complex flash app that runs in adobe air. i have a large slideshow incorporated in it, 57 images, 1920x794. i had one working using xml, but it breaks inside the air .app, i rebuilt it sometime this morning using tween max, but, it doesn't loop seamlessly, leaving the screen blank for about 10 seconds, how can i loop it seemlessly and fix the blank space?!?! i'm pretty braindead from lack of sleep, and i just can't wrap my head around fixing the code properly, here's a small sample of my lame code below, please excuse the lack of getting my movie clips in an array, soooo tired.....

var pic1:image1 = new image1();
pic1.x = 0;
pic1.y = 0;
pic1.alpha = 0;

var pic2:image2 = new image2();
pic2.x = 0;
pic2.y = 0;
pic2.alpha = 0;

var pic3:image3 = new image3();
pic3.x = 0;
pic3.y = 0;
pic3.alpha = 0;

var clips:Array = [pic1, pic2, pic3];
var timeline:TimelineMax = new TimelineMax({repeat:-1, repeatDelay:1.5});
timeline.insertMultiple( TweenMax.allFrom(clips, 1, {autoAlpha:0}, 5), 1);
timeline.insertMultiple( TweenMax.allTo(clips, 1, {autoAlpha:0}, 5), 5.8);

Link to comment
Share on other sites

var clips:Array = [pic1, pic2, pic3, pic4, pic5];

//make them all invisible to begin with
TweenMax.allTo(clips, 0, {autoAlpha:0});

//do the first fade in manually so that when your timeline starts, it's fully opaque. That way, when the timeline loops, it'll be seamless (we'll fade the image in at the end of the timeline)
TweenLite.to(clips[0], 1, {autoAlpha:1, delay:1.5});

var timeline:TimelineMax = new TimelineMax({repeat:-1, delay:2.5});
timeline.insertMultiple( TweenMax.allTo(clips, 1, {autoAlpha:1}, 5), 1);
timeline.insertMultiple( TweenMax.allTo(clips, 1, {autoAlpha:0}, 5), 5.8);

//at the end, fade the first one in again so it's fully opaque when the timeline loops.
timeline.append( TweenLite.to(clips[0], 1, {autoAlpha:1}), -1);

Link to comment
Share on other sites

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...