turning light on image at end of script
Hi
I know nothing about javascript.
i want to use this script (below). After it has run, i want the image to show but its blacked out
any ideas??
cheers!!
<html>
<head>
<script type="text/javascript">
var timer
i=0
j=0
k=0
l=160
m=120
function setlight()
{
document.getElementById('light_div').filters[0].clear()
if (i<100)
{
document.getElementById('light_div').filters[0].addcone(0,0,0,50,50,100,120,200,i,100)
}
else
{
if (j<160)
{
document.getElementById('light_div').filters[0].addcone(j,0,0,50,50,100,120,200,i,200)
j++
}
else
{
if (k<120)
{
document.getElementById('light_div').filters[0].addcone(j,k,0,50,50,100,120,200,i,200)
k++
}
else
{
if (l>0)
{
l--
document.getElementById('light_div').filters[0].addcone(l,k,0,50,50,100,120,200,i,200)
}
else
{
if (m>0)
{
m--
document.getElementById('light_div').filters[0].addcone(l,m,0,50,50,100,120,200,i,200)
}
else
{
stoptimer()
}
}
}
}
}
i++
timer=setTimeout("setlight()",1)
}
function stoptimer()
{
clearTimeout(timer)
}
</script>
<style>
div
{
width:100px;
}
body
{
background:#000000;
}
</style>
</head>
<body onload="setlight()" onunload="stoptimer()">
<div id="light_div" style="filter:light(enabled=1);"><img src="landscape.jpg" width="160" height="120" /></div>
</body>
</html>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks