Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

_cyclone_

Luz perseguindo o mouse

Recommended Posts

fiz um exemplo aqui de como pode ser feito

seria mais fácil usar o javascript dele pra fazer isso:

<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 scripts = 35; // the size of the spotlightvp = 50; // the visibility percent of the picturestartx = 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:falsefunction 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 = 0var tempY = 0function getMouseXY(e) {tempX = event.offsetXtempY = 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>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.