TurboSasa Posted December 19, 2005 Report Share Posted December 19, 2005 Nekaadas saprashanas par java script man nav, tapeec jautaaju dazhaas lapaas esmu redzeejis kriitoshus pbjektus paari visai lapai vai konkreetai daljai piem., shajaa gadiijumaa gribeetos, lai kaads pastasta kaa kaut ko taadu sataisiit gribu, lai manaa lapaa snieg sniegs (tas ir kriit sniegpaarslinjas) paldies par sapratini! Link to comment Share on other sites More sharing options...
rpr Posted December 19, 2005 Report Share Posted December 19, 2005 atver lapu, kuraa tu redzeeji taas sniegpaarslinjas un paskaties skriptu. Link to comment Share on other sites More sharing options...
TurboSasa Posted December 19, 2005 Author Report Share Posted December 19, 2005 kaa es sapratiishu kursh skripts man buus nepieciesham! Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 19, 2005 Report Share Posted December 19, 2005 TurboSasa--> sakumaa to saitu nokopee nevis surci bet tieshi visu lapu ar visam bildeem utt... un talaak 'Metodam nauchnova pritika' ;) - ekspermentali ;) met visu lieko nost un skaties.... Link to comment Share on other sites More sharing options...
TurboSasa Posted December 19, 2005 Author Report Share Posted December 19, 2005 Pirmkaart es nezinu kaa var nokopeet visu saitu... Otrkaart tajaa lapaa vairs nav to sniegpaarslinju (ko tagad dariit!?) Link to comment Share on other sites More sharing options...
php_Stopp Posted December 19, 2005 Report Share Posted December 19, 2005 uztaisi lapu freewebos, pieliec klāt spociņus (ja tur tādi vēl ir), paņem sourci un pēti visu, kas atrodas starp <script> un </sript> :) ps. es vēl pa visu savu kodēšanas praksi to dhtml mudžekli neesmu izpratis ;) pirms mirklīša atcerējos tādu kodu vienā vietā, kur ir pat ar komentāriem visiem, un tas kods arī vēl (pēc cik gadu nelietošanas) tur stāv.. :) http://nightwish.com/snow.js Link to comment Share on other sites More sharing options...
Klez Posted December 19, 2005 Report Share Posted December 19, 2005 nahrenaa tos sniegus vaig ??? tas sniegs prasa daudz procesora resursus. ja pusliiki tie sniegi buus, tad tavaa lapaa lietotaajs kam ir 400 celeron , vienjam pc nokaarsies - procis cepsies. un vinsh tavaa lapaaa neies, jo vinjam tava lapa "pakar" kompi. Link to comment Share on other sites More sharing options...
bubu Posted December 19, 2005 Report Share Posted December 19, 2005 Pirmkaart es nezinu kaa var nokopeet visu saitu... Tika domāts saglabāt lapu: File->Save As... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 19, 2005 Report Share Posted December 19, 2005 vispar tas mehanisms ir diezgan vienkaarsh... pamataa ir n objekti <div> kas katrs satur bildiiti un tiek mainiita vertikaalaa kordinaate ... pamats ir tas pats kaa jebkuram kustiigam web objektam ... bet seit atskjiriiba ir taada ka visu laiku tiek kautkas rekjinaats un parziimeets Link to comment Share on other sites More sharing options...
vladimirs Posted December 19, 2005 Report Share Posted December 19, 2005 (edited) iekopee ieksh body sho <script type="text/javascript"> Change URL path to the snow image below grphcs=new Array(6) Image0=new Image(); Image0.src=grphcs[0]="snow1.gif"; Image1=new Image(); Image1.src=grphcs[1]="snow2.gif" Image2=new Image(); Image2.src=grphcs[2]="snow3.gif" Image3=new Image(); Image3.src=grphcs[3]="snow4.gif" Image4=new Image(); Image4.src=grphcs[4]="snow5.gif" Image5=new Image(); Image5.src=grphcs[5]="snow6.gif" // Configure below - change number of snow to render Amount=15; Ypos=new Array(); Xpos=new Array(); Speed=new Array(); Step=new Array(); Cstep=new Array(); ns=(document.layers)?1:0; ns6=(document.getElementById&&!document.all)?1:0; if (ns){ for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>"); } } else{ document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">'); } document.write('</div></div>'); } WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; for (i=0; i < Amount; i++){ Ypos[i] = Math.round(Math.random()*WinHeight); Xpos[i] = Math.round(Math.random()*WinWidth); Speed[i]= Math.random()*5+3; Cstep[i]=0; Step[i]=Math.random()*0.1+0.05; } function fall(){ var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop; var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft; for (i=0; i < Amount; i++){ sy = Speed[i]*Math.sin(90*Math.PI/180); sx = Speed[i]*Math.cos(Cstep[i]); Ypos[i]+=sy; Xpos[i]+=sx; if (Ypos[i] > WinHeight){ Ypos[i]=-60; Xpos[i]=Math.round(Math.random()*WinWidth); Speed[i]=Math.random()*5+3; } if (ns){ document.layers['sn'+i].left=Xpos[i]; document.layers['sn'+i].top=Ypos[i]+hscrll; } else if (ns6){ document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]); document.getElementById("si"+i).style.top=Ypos[i]+hscrll; } else{ eval("document.all.si"+i).style.left=Xpos[i]; eval("document.all.si"+i).style.top=Ypos[i]+hscrll; } Cstep[i]+=Step[i]; } setTimeout('fall()',115); } window.onload=fall //--> </SCRIPT> un izveido failu snow.gif (saproti cerams kam tas) pilna guugle ar paraugiem Edited December 19, 2005 by vladimirs Link to comment Share on other sites More sharing options...
Kavacky Posted December 20, 2005 Report Share Posted December 20, 2005 Cik pārskatāms kods. Link to comment Share on other sites More sharing options...
[Ya] Posted December 20, 2005 Report Share Posted December 20, 2005 man viens nedaudz jaukaaks kods, un labaak daraas :) http://ya.dnet.lv/snow.html uzliku labu fishku moka kādam vajadzēs, doma pat ir uztaisīt jo ilgāk sēž lapā jo apakšā sasnieg vairāk, tipa DIV ceļās augšā :) 170 Px no apakšas sniega pārsla pamazām izzūd, un tad atkal krīt no augšas :) varat iečekot, strādā visos browseros (Itkā)..... vismaz FF && IE strādā :) Link to comment Share on other sites More sharing options...
php_Stopp Posted December 20, 2005 Report Share Posted December 20, 2005 [Ya], tu šito js kodu pats no nulles rakstīji ?? Link to comment Share on other sites More sharing options...
v3rb0 Posted December 20, 2005 Report Share Posted December 20, 2005 (edited) IceWM logos tada fīča bija redzēta - saucās xsnow vai kkā tā, uh nostaļģija piemetās! :) Edited December 20, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
[Ya] Posted December 20, 2005 Report Share Posted December 20, 2005 [Ya], tu šito js kodu pats no nulles rakstīji ?? daljeeji .... Link to comment Share on other sites More sharing options...
Recommended Posts