?
Solved

seamless flash loop

Posted on 2009-04-08
1
Medium Priority
?
523 Views
Last Modified: 2013-11-11
Hi,
i'm trying to created a seamless loop of fading images using actionscript. With the AS i'm using it fades out the last image then fades in the first image again so there is a gap between the last and the first image.
I'd like the last image to fade into the first image seamlessly without a gap.
I'm using tweenlite but would take suggestions of other options
Below is my code:
import gs.TweenLite;
 
 
		function startShow():Void {		
		
		image1._alpha = 0; // start faded down
		TweenLite.to(image1, 1, {_alpha:100});
		TweenLite.to(image1, 1, {_alpha:0, delay:3, overwrite:false});
		
		image2._alpha = 0; // start faded down
		TweenLite.to(image2, 1, {_alpha:100, delay:3, overwrite:false});
		TweenLite.to(image2, 1, {_alpha:0, delay:6, overwrite:false});
		
		image3._alpha = 0; // start faded down
		TweenLite.to(image3, 1, {_alpha:100, delay:6, overwrite:false });
		TweenLite.to(image3, 1, {_alpha:0, delay:9, overwrite:false});
 
		
		image4._alpha = 0; // start faded down
		TweenLite.to(image4, 1, {_alpha:100, delay:9, overwrite:false});
		TweenLite.to(image4, 1, {_alpha:0, delay:12, overwrite:false});
 
		image5._alpha = 0; // start faded down
		TweenLite.to(image5, 1, {_alpha:100, delay:12, overwrite:false});		
		TweenLite.to(image5, 1, {_alpha:0, delay:15, overwrite:false, onComplete:startShow, onCompleteScope:this});
   }
 
startShow();

Open in new window

0
Comment
Question by:George-TCC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
wal_toor earned 2000 total points
ID: 24113843
Hellow,

I think it has to do with the delay settings. The fading takes 1 second. After this you start fading in the next one. I think you have to start fading in 1 second earlier.

Try this.

greetz,
walter
import gs.TweenLite;
 
 
                function startShow():Void {             
                
                image1._alpha = 0; // start faded down
                TweenLite.to(image1, 1, {_alpha:100});
                TweenLite.to(image1, 1, {_alpha:0, delay:3, overwrite:false});
                
                image2._alpha = 0; // start faded down
                TweenLite.to(image2, 1, {_alpha:100, delay:2, overwrite:false});
                TweenLite.to(image2, 1, {_alpha:0, delay:5, overwrite:false});
                
                image3._alpha = 0; // start faded down
                TweenLite.to(image3, 1, {_alpha:100, delay:4, overwrite:false });
                TweenLite.to(image3, 1, {_alpha:0, delay:7, overwrite:false});
 
                
                image4._alpha = 0; // start faded down
                TweenLite.to(image4, 1, {_alpha:100, delay:6, overwrite:false});
                TweenLite.to(image4, 1, {_alpha:0, delay:9, overwrite:false});
 
                image5._alpha = 0; // start faded down
                TweenLite.to(image5, 1, {_alpha:100, delay:8, overwrite:false});               
                TweenLite.to(image5, 1, {_alpha:0, delay:11, overwrite:false, onComplete:startShow, onCompleteScope:this});
   }
 
startShow();

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question