Phorum.ro
Your Avatar Welcome to Phorum.ro!
If you haven't registered yet, click here!
Attention Visitor:
You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Du-te înapoi   Phorum.ro > Web Design & Web Development > Programare > Java > Discutii Generale

Discutii Generale In general despre Java.

Răspunde
 
Thread Tools Moduri de afișare
Vechi 27.09.2006   #1
HTG
16-Bit Member
 
Data înregistrării: 12.06.2006
Mesaje: 26
Rep Power: 6
HTG is on a distinguished road
Implicit Javascript...

va rog frumos care stie sa faca posibila vizualizarea unui cursor in javascript din orice browser? momentan am doar probleme cu Mozilla...in rest merg
uitati si scriptul...care ma puteti ajuta v-as ramane ff recunoscator...macar o idee....

Cod HTML:
<script>
B=document.all;C=document.layers;cC=new Array();
T1=new Array("Potter/HP.gif",10,10, "Potter/HP.gif",20,20, "Potter/HP.gif",30,30, "Potter/HP.gif",40,40, "Potter/HP.gif",50,50);
nos=parseInt(T1.length/3);
rate=100;
renderrate=500;
for (i=0;i<nos;i++)
createCell('CUR'+i,i*10,i*10,T1[i*3+1],T1[i*3+2],'','<img src="'+T1[i*3]+'" width='+T1[(i*3+1)]+' height='+T1[(i*3+2)]+' border=0>')
function cycle(){for (i=0;i<(nos-1);i++){moveCell('CUR'+i,getXpos('CUR'+(i+1)),getYpos('CUR'+(i+1)))}}
function newPos(e){if (window.MMTime){window.clearTimeout(window.MMTime);window.MMTime=null}for (i=0;i<(nos-1);i++)showCell('CUR'+(i));showCell('CUR'+(nos-1));moveCell('CUR'+(nos-1),((B)?event.clientX+document.body.scrollLeft:e.pageX)+2,((B)?event.clientY+document.body.scrollTop:e.pageY)+2);window.MMTime=window.setTimeout('cycle2()',renderrate)}
if(document.layers)document.captureEvents(Event.MOUSEMOVE);
if (B)document.body.onscroll=newPos;
document.onmousemove=newPos;
window.MTIRQ=setInterval('cycle()',rate);
function createCell(N, Xp, Yp,W,H,A,Ht,BG,O,S){with(document){(C)?write("<layer name='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H ):write("<div id='"+N+"' style='position:absolute; left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H);if (BG){X=(C)?" BGColor=":"; background-color:";write(X+BG)}if(S)write((C)?" style=' "+S+"'":"; "+S+"'");if(B&&!S)write("'");write((A)?" "+A+">":">");write(Ht)}if(!O)closeCell();cC[cC.length]=N;XX=eval("window."+N+"=getCell(N)");if(B){XX.moveTo=moveTo;XX.moveBy=moveBy}
XX.innerHTML=Ht;XX.ID=N;eval(getCell(N).refresh=refresh)};
function moveCell(N,Xp,Yp){D=getCell(N);D.left=Xp;D.top=Yp};
function getYpos(N){return (parseInt(getCell(N).top))};
function getXpos(N){return (parseInt(getCell(N).left))};
function closeCell(){document.write((B)?"</div>":"</layer>")};
function getCell(N){D=(C)?C[N]:B[N].style;if(D==null&&C){rr=C.length;for (i=0;i<rr;i++){D=C[i].document.layers;if(D)D=D[N];if(D)return D}}return D}
function refresh(){if(B){document.all[this.ID].innerHTML=this.innerHTML}}
function getObject2(N){e=(C)?C[N]:B[N];if(e==null&&C){rr=C.length;for (i=0;i<rr;i++){e=C[i].document.layers;if(e)e=e[N];if(e) return e;}}return e}
function showCell(N){getCell(N).visibility=(B)?"visible":"show"}
function hideCell(N){getCell(N).visibility=(B)?"hidden":"hide"}
function cycle2(){for (i=0;i<nos;i++)hideCell('CUR'+i)}
</script>
HTG is offline   Reply With Quote
Sponsored Links
Vechi 28.09.2006   #2
Zeon
32-Bit Member
 
Data înregistrării: 10.05.2006
Mesaje: 167
Rep Power: 7
Zeon is on a distinguished road
Implicit

daca vrei sa schimbi cursorul cu o imagine, de ce nu folosesi css?

body{
cursor:url(imagine.gif);
}
Zeon is offline   Reply With Quote
Vechi 28.09.2006   #3
BETng4U
64-Bit member
 
BETng4U's Avatar
 
Data înregistrării: 21.02.2006
Locație: 127.0.0.1 - barlad
Vârsta: 23
Mesaje: 334
Rep Power: 7
BETng4U is on a distinguished road
Trimite un mesaj prin Yahoo pentru BETng4U
Implicit

pacat ca nu merge in mozilla respectivul cod css

eu am alat idee .... oleak neordodoxa dar .... o idee oricum:

so... faci un flash de dimenisiunile pagini tale.. cu ajutorul action script'ului anulezi cursor default si iti creezi tu un costum... apoi inserezi respectivul flash in html cu parametrul wmode setata la transparent .. acest flash il pui intr'un div si aici tebuie sa fi ingenios sa'l pui sa se vada in fata... dar sa poti face clci pe ce e dedesubt ... eu sincer nu prea iti recomanda propia mea idee .. ca e prea zuzu...
ori faci site'ul in falsh total ...
ori fol css .. dar no sa mearga pe mozilla
iar js n'as fol ca manaca destule resrse pentru a'ti creea tie un cursor...
(asta se intampla pt ca normal.. exista o mica particica a placi video care este dedicata mouse'ului... daca pui aceasta sarcica pe caul cpu'lui ... el ti'o va face ... dar nu vei mai putea creea alte efcte pt ca cel mai probabil pe calc din categoria media vor sacada

mie imi plac site'urile care nu'mi schimba cursorul
BETng4U is offline   Reply With Quote
Vechi 28.09.2006   #4
HTG
16-Bit Member
 
Data înregistrării: 12.06.2006
Mesaje: 26
Rep Power: 6
HTG is on a distinguished road
Implicit

fir-ar mozilla :kill:
HTG is offline   Reply With Quote
Răspunde


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Moduri de afișare

Reguli de postare
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Pornit
emoticoanele sunt Pornit
Codul [IMG] este Pornit
Codul HTML este Oprit



Ora este GMT +3. Ora este acum 01:27:09.


Rulează cu: vBulletin Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum SEO by Zoints

XXXXXXXXXXXXXXXXXXX
Inactive Reminders By Icora Web Design