1111
July 29, 2003, 6:05am
1
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.
=)
system
July 29, 2003, 6:18am
2
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
system
July 29, 2003, 6:21am
3
Thanx esxs, i have already scoured that source. I will keep hunting. I have also the random image stuff working. … cheers tho
system
July 29, 2003, 6:35am
4
u r welcome .:®:. if you want help about the AS that u need,i’m here…
system
July 29, 2003, 8:05am
5
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?
system
July 29, 2003, 9:33am
6
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>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
if (mypic>=10) {
mypic = 1;
startTimeSet = 0;
lastTimer = getTimer();
}
if ((getTimer()-lastTimer)>(5000*mypic) && mypic<10 && !fadeIn && !fadeout) {
fadeout = true;
mypic += 1;
}
};[/AS]
e.s.x.s
system
July 29, 2003, 9:45am
7
hey Thanks!
It didn’t show the pics, but will look into it more…
Nice code m8!.. cheers
system
July 29, 2003, 9:55am
8
i just wrote the code for the periodically change and loop;) didn’t change the other parts of the code…
u r welcome again, .:®:.