-=Martini=- Posted December 6, 2005 Report Share Posted December 6, 2005 Kā var izveidot tā, lai baneris slīdētu(peldētu,būt kustībā) pa visu web lapu? Jau iepriekš paldies :) Link to comment Share on other sites More sharing options...
alins Posted December 6, 2005 Report Share Posted December 6, 2005 labaak nesakiet vinjam :P , kaitina taadas reklaamas un banneri... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 6, 2005 Report Share Posted December 6, 2005 alins--> kaitinoshi tas tiesa, bet arii efektiivi... ja nav paaraak uzbaaziiga un saits ir intresantstad var pieciest... -=Martini=- --> pamatprincips ir DIVa kordinaashu mainiishana ar nelieliem laika intervaaliem... pameklee goglee par DHTML gandriiz katraa lapaa kur tiek aprakstiita DHTML ir arii shaadi peimeeri.... Link to comment Share on other sites More sharing options...
-=Martini=- Posted December 6, 2005 Author Report Share Posted December 6, 2005 Jūs tā no galvas neatceraties kā var izveidot to scriptu? Varbūt ir kāts links kur to visu var izlasīt? Man prieks par šo forumu, vismaz tiek atbildēts nevis pēc stundas ;) Link to comment Share on other sites More sharing options...
bubu Posted December 6, 2005 Report Share Posted December 6, 2005 Un ja neatbildētu uzreiz, tad tu te bezjēgāt taisītu vienu postu pēc otra ("nuu kaaasiiii ko neatbiiild?") ? Grey_Wolf jau tev priekšā pateica: http://www.google.com/search?hl=en&lr=&q=dhtml+moving+banner Un pirmais links no rezultātiem: http://webdeveloper.earthweb.com/webjs/jsbanner/ Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 6, 2005 Report Share Posted December 6, 2005 vismaz tiek atbildēts nevis pēc stundas ;) tas atkariigs vai kaadam ir laiks ko dariit...var paiet arii krietni vairaak kaa stunda ;)------------- gatavus skriptus te neviens nerakstiis! ----- kaa jau mineeju: ar noteiktu intervaalu dinamiski mani DIV kordinaates kordinaates=kordinaates+solis; getElementById('DIVa_ID').style.left=kordinaates; Link to comment Share on other sites More sharing options...
-=Martini=- Posted December 6, 2005 Author Report Share Posted December 6, 2005 Šobrīd es pētu tavus piedāvātos linkus... Link to comment Share on other sites More sharing options...
-=Martini=- Posted December 6, 2005 Author Report Share Posted December 6, 2005 Tajos linkos ir ļoti daudz viskaut kas, bet to ko man vajag es nevaru atrast. ;) Link to comment Share on other sites More sharing options...
php_Stopp Posted December 8, 2005 Report Share Posted December 8, 2005 to jau var izdarīt arī bez js.. ja nevajag, lai baneris lēkātu uz augšu un leju.. <marquee loop="infinite"><img src="banner.gif"/></marquee> Link to comment Share on other sites More sharing options...
-=Martini=- Posted December 8, 2005 Author Report Share Posted December 8, 2005 ======================Shis ir html fails ar kuru tiek palaists JavaScripts =============== <html> <head> <title></title> <script type="text/javascript" src="moveobj.js"> </script> <script type="text/javascript"> /*********************************************** * Floating image script- By Virtual_Max (http://www.geocities.com/siliconvalley/lakes/8620) * Modified by Dynamic Drive for various improvements * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ <!--//Step 1: Define unique variable names depending on number of flying images (ie:3):--> var flyimage2 function pagestart(){ <!--//Step 2: Using the same variable names as 1), add or delete more of the below lines (60=width, height=80 of image):--> flyimage2=new Chip("flyimage2",6,8); <!--//Step 3: Using the same variable names as 1), add or delete more of the below lines:--> movechip("flyimage2"); } if (window.addEventListener) window.addEventListener("load", pagestart, false) else if (window.attachEvent) window.attachEvent("onload", pagestart) else if (document.getElementById) window.onload=pagestart </script> </head> <body> <!-- Step 4: Define your flying images. For each image's ID tag, use the same variable names as 1) above --> <DIV ID="flyimage2" STYLE="position:absolute; left: -500px; width:6; height:8;"> <A HREF="http://dynamicdrive.com"><IMG SRC="flyimage2.gif" BORDER=0></a> </DIV> </body> </html> ========================Sheit html fails beidzas============================== =======================Shis ir JavaScript fails ar nosaukumu moveobj.js============== /*********************************************** * Floating image script- By Virtual_Max (http://www.geocities.com/siliconvalley/lakes/8620) * Modified by Dynamic Drive for various improvements * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ var vmin=2; var vmax=5; var vr=2; var timer1; var StayAlive = 15; function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function Chip(chipname,width,height){ this.named=chipname; this.vx=vmin+vmax*Math.random(); this.vy=vmin+vmax*Math.random(); this.w=width+20; this.h=height; this.xx=Math.random()*800; this.yy=Math.random()*800; this.timer1=null; } function movechip(chipname){ if (document.getElementById){ eval("chip="+chipname); if (window.innerWidth || window.opera){ pageX=window.pageXOffset; pageW=window.innerWidth-40; pageY=window.pageYOffset; pageH=window.innerHeight-20; } else if (document.body){ pageX=iecompattest().scrollLeft; pageW=iecompattest().offsetWidth-40; pageY=iecompattest().scrollTop; pageH=iecompattest().offsetHeight-20; } chip.xx=chip.xx+chip.vx; chip.yy=chip.yy+chip.vy; chip.vx+=vr*(Math.random()-0.5); chip.vy+=vr*(Math.random()-0.5); if(chip.vx>(vmax+vmin)) chip.vx=(vmax+vmin)*2-chip.vx; if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx; if(chip.vy>(vmax+vmin)) chip.vy=(vmax+vmin)*2-chip.vy; if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy; if(chip.xx<=pageX){ chip.xx=pageX; chip.vx=vmin+vmax*Math.random(); } if(chip.xx>=pageX+pageW-chip.w){ chip.xx=pageX+pageW-chip.w; chip.vx=-vmin-vmax*Math.random(); } if(chip.yy<=pageY) {chip.yy=pageY; chip.vy=vmin+vmax*Math.random(); } if(chip.yy>=pageY+pageH-chip.h) {chip.yy=pageY+pageH-chip.h; chip.vy=-vmin-vmax*Math.random(); } document.getElementById(chip.named).style.left=chip.xx+"px"; document.getElementById(chip.named).style.top=chip.yy+"px"; chip.timer1=setTimeout("movechip('"+chip.named+"')",100); } } ===========================Sheit JavaScript beidzas========================== *) Vienalga kada bildite ar nosaukumu flyimage2.gif tiek izmantota *) Abi faili un bildite atrodas vienaa mapee 1)Luudzu apskatieties kapec izmainot html faila width un height bildes izmers nemainaas? 2)Vel pedejais lugums. Ar kadu funkciju vai kaa savadak pec noteikta laika (pienemsim pec 30 sekundem) pazuud bildiite, kas visu laiku lidinajas pa visu web lapu? Link to comment Share on other sites More sharing options...
php_Stopp Posted December 8, 2005 Report Share Posted December 8, 2005 1) garākiem kodiem tiek izmantots paste.php.lv 2) kam tu to izmēru tieši maini - div vai img ? Link to comment Share on other sites More sharing options...
-=Martini=- Posted December 8, 2005 Author Report Share Posted December 8, 2005 Es abiem mainiju, bet rezultats tas pats ieprieks kas jau bija.Par paste.php.lv turpmak es to iegaumeshu. Par bildes izmeriem man beidzot izdevas izmainit. Vel vienigi ir atlicis par bildes pazushanu pec 30 sekundem. Ja vienigi es zinatu konkretu funkciju, tad es varetu meginat kaut ko lietas laba daritu. Link to comment Share on other sites More sharing options...
Paulinjsh Posted December 10, 2005 Report Share Posted December 10, 2005 http://www.devguru.com/Technologies/ecmasc...settimeout.html Šitas tev varētu līdzēt. Link to comment Share on other sites More sharing options...
Recommended Posts