Timer image swap with alpha fade in/out

I am chasing a good tutorial on an image swap via timer. ( i dont want to tween).

I just want to cycle around 10 small images, show for about 15 seconds then fade out/in the next image…

If anyone knows a good link for a tute on this I would really appreciate it.
=)

check out this link… this will help you to understand the timing in flash…
http://www.kirupa.com/developer/actionscript/digital_clock.htm

e.s.x.s

Thanx esxs, i have already scoured that source. I will keep hunting. I have also the random image stuff working. … cheers tho

u r welcome .:®:. :slight_smile: if you want help about the AS that u need,i’m here…:wink:

getting there…Okay, ihave the following code. This works great, but i want to extend the fade time and hopefully loop.:

square._alpha=0;
mypic=1;
// script causes slides to advance automatically every 5 seconds – no start button it just plays

_root.onEnterFrame = function()
{
if (square._alpha < 10)
{
loadMovie(“images/image” + mypic + “.jpg”, “square”)
fadeOut=false;
fadeIn=true;
message.text=mypic;
}

if (square._alpha > 10 && fadeOut)
{
square._alpha -= 10;
}

if (square._alpha < 100 && fadeIn && !fadeOut)
{
square._alpha += 10;
}
else
{
fadeIn=false;
}

if (mypic>=10)
{
mypic=1
startTimeSet=0;
}

if (getTimer() > 5000 && mypic < 10 && !fadeIn && !fadeout && mypic==1)
{
fadeout=true;
mypic=2;
}

if (getTimer() > 10000 && mypic < 10 && !fadeIn && !fadeout && mypic==2)
{
fadeout=true;
mypic=3;
}

if (getTimer() > 15000 && mypic < 10 && !fadeIn && !fadeout && mypic==3)
{
fadeout=true;
mypic=4;
}
// continue to add if statements for every image in the series mypic==4, 5, 6, 7 etc.
}

any suggestions?..pleeeeeeeeze? :b:

i think, this is want you want:
[AS]
square._alpha = 0;
mypic = 1;
_root.onEnterFrame = function() {
loadMovie(“images/image” + mypic + “.jpg”, “square”)
fadeOut=false;
fadeIn=true;
message.text=mypic;

if (square._alpha&gt;10 && fadeOut) {
	square._alpha -= 10;
}
if (square._alpha&lt;100 && fadeIn && !fadeOut) {
	square._alpha += 10;
} else {
	fadeIn = false;
}
if (mypic&gt;=10) {
	mypic = 1;
	startTimeSet = 0;
	lastTimer = getTimer();
}
if ((getTimer()-lastTimer)&gt;(5000*mypic) && mypic&lt;10 && !fadeIn && !fadeout) {
	fadeout = true;
	mypic += 1;
}

};[/AS]

e.s.x.s

hey Thanks!

It didn’t show the pics, but will look into it more…
Nice code m8!.. cheers

i just wrote the code for the periodically change and loop;) didn’t change the other parts of the code…
u r welcome again, .:®:.:wink: