Log In · Register

 
the spot light effect, anyone know the code for it??
galilea
post Apr 3 2004, 04:23 PM
Post #1


Senior Member
***

Group: Member
Posts: 47
Joined: Feb 2004
Member No: 3,975



There is this really cool effect that I have found called the spotlight effect.

What it does is covers the picture in a layer of black and when you go over it with your mouse it lights a little part of it up.

I found this code in the Dynamic Drive website and I know that those codes don't work for xanga.

But I did see it work on someone else's xanga a LONG time ago.

If you want to see what I mean then go here:spotlight effect

does anyone know a similar code for this that will work on xanga?
 
 
Start new topic
Replies (1 - 2)
espressive
post Apr 3 2004, 07:27 PM
Post #2


and so it is
******

Group: Human
Posts: 1,304
Joined: Feb 2004
Member No: 3,085



yea, that's really cool. No, i think it works...i've seen people who didn't need to edit the code...just try putting this code into your header and webstats, keep trying:

CODE
<!-- begin code provided by createblog.com -->
<script language="JavaScript1.2">

//Image spotlight effect- By Erik F (die_schlampe@hotmail.com)
//Code enhancements by Dynamicdrive.com
//Visit http://www.dynamicdrive.com for this script

s = 50; // the size of the spotlight
vp = 10; // the visibility percent of the picture
startx = 0; // the top position of your sportlight into the image (on start)
starty = 0; // the left position of your spotlight into the image (on start)


//////////////////////////////////////////////////////////////////
//  No need to edit below this line      //
//////////////////////////////////////////////////////////////////

var IE = document.all?true:false

function moveL()
{
xv = tempX;
yv = tempY;
myimage.filters.light.MoveLight(1,xv,yv,s,true);
}

if (IE&&myimage.filters)
document.all.myimage.onmousemove = getMouseXY;
var tempX = 0
var tempY = 0


function getMouseXY(e) {
tempX = event.offsetX
tempY = event.offsetY

 if (tempX < 0){tempX = 0}
 if (tempY < 0){tempY = 0}
 if (t)
 {  
  moveL();
 }

 return true
}

var xv = startx;
var yv = starty;
var t= true;
if (IE&&myimage.filters){
myimage.style.cursor="hand";
myimage.filters.light.addAmbient(255,255,255,vp)
myimage.filters.light.addPoint(startx,starty,s,255,255,255,255)
}

</script>
<!-- end code provided by createblog.com -->
 
visualfusion
post Apr 4 2004, 12:51 AM
Post #3


Senior Member
*****

Group: Member
Posts: 699
Joined: Mar 2004
Member No: 7,274



that's pretty cool =]
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: