Click to See Complete Forum and Search --> : blendtrans function


phenomanomaly
09-10-2003, 01:26 PM
Hey everyone,

Is it possible to use the blend trans function with background images ? so that your background image can continuously fade in to other images underneath your text ?

The background image is in a cell and I want to nest tables etc. on top of that to position text wherever i like etc ...

I have code that blends images together and works fine, but I'm not sure how to adapt it to work for a background image (if thats possible)

I would really appreciate if any of you could take a look at the code and suggest what changes I should make so that It will work for background images in a table cell ...

Thank you !

the code I've been using is below:

***********************************************

<html>
<head>

<script language="JavaScript1.1">

<!--
//preload images
var image1=new Image()
image1.src="images/fadepic1.jpg"
var image2=new Image()
image2.src="images/fadepic2.jpg"
var image3=new Image()
image3.src="images/fadepic3.jpg"
var image4=new Image()
image4.src="images/fadepic4.jpg"
//-->
</script>

<script>
<!--
var step=1
var whichimage=1
function slideit()
{
if (!document.images)
return
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.apply()
document.images.slide.src=eval("image"+step+".src")
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.play()
whichimage=step
if (step<4)
step++
else
step=1
setTimeout("slideit()",5000)
}

function slidelink()
{
if (whichimage==1)
window.location="link1.htm"
else if (whichimage==2)
window.location="link2.htm"
else if (whichimage==3)
window.location="link3.htm"
else if (whichimage==4)
window.location="links4.htm"
}
//-->
</script>
</head>

<body onLoad="slideit()">
<div align="center">
<a href="javascript:slidelink()">
<table width="760" border="0">
<tr>
<td><div align="center"><img src="images/fadepic1.jpg" name="slide" border=0 style="filter:blendTrans(duration=3)"></div></td>
</tr>
</table>

</div>
</body>
</html>