Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fading in in order

Status
Not open for further replies.

itsita001

Programmer
Nov 6, 2002
21
0
0
IL
How would i have a picture fade in (on load of page) then after a certain period of time another picture fade in, then after a different period of time a set of pictures fade in, etc......
Would be great id you could help me out.
 
Forgot to say, if possible then satart the fding of the second pic while then one of the first pic is in the middle of faing in, and so on and so on...
 
I don't know your knowledge, but I haven't time to write a whole thing.
This is a script I wrote before that fades in one image after a second of the page loading. Maybe you can play with this, or somebody else that has time.....
Code:
<html>
<head>

<SCRIPT LANGUAGE=&quot;javascript&quot;>
var step=1;
var delay=5;
var opac=1;
var startdelay=1000; //1 second

function fadeIt()
{

  if (opac <= 100){
	
     	thePic.filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity = opac;
	opac += step;
	timer=setTimeout('fadeIt()',delay);
	
  } else {
	clearTimeout(timer);
  }	
}
</SCRIPT>
</head>

<body onLoad=&quot;var timer=setTimeout('fadeIt()',startdelay)&quot;>

<img id=&quot;thePic&quot; src=&quot;../yourpic.gif&quot; style=&quot;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);&quot;>

</body>
</html>
Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
I tried to call do that using a peramiter and i got &quot;filters&quot; is null or undefined. here is what I have where did I go wrong?

<SCRIPT LANGUAGE=&quot;javascript&quot;>
var step=1;
var delay=5;
var opac=1;
var startdelay=1000; //1 second
function fadeIt(fImage){
if (opac <= 100){
fImage.filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity = opac;
opac += step;
timer=setTimeout('fadeIt(fImage)',delay);
}else{
clearTimeout(timer);
}
}
</SCRIPT>
<script language = &quot;javascript&quot;>
function fadeIn(){
fadeIt('thePic');
}
</script>
</head>

<body onLoad=&quot;var timer=setTimeout('fadeIn()',startdelay);&quot;> How many software developers does it take to change a light bulb?
None: it works in everyone else’s office, it must work in yours too.
 
What does the line that displays your image look like? Do you have the filter defined on it as above? Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
yes I do. the only thing different is i'm passing a perameter. How many software developers does it take to change a light bulb?
None: it works in everyone else’s office, it must work in yours too.
 
Try
Code:
document.getElementById(fImage).filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity = opac;

This'll be it for today, sorry.
Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top