HTML tutorijali,Java skripte,Hack fajlovi......

ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
EFEKAT POJAVLJIVANJA DUHOVA

Jedan jako kvalitetan efekat mozete ugraditi u vas html fajl.Potrebno je samo da iskopirate java skriptu u body deo vasef html fajla (<body> java skripta </body> i to sledecu.....

PHP:
<SCRIPT TYPE="text/javascript">
 /**
  ** Ghosts - Halloween -  JavaScript 
  ** This script and many more are free at
  ** http://rainbow.arch.scriptmania.com/scripts/
  */
if(!window.Halloween) Halloween=new Object();
Halloween.ghostImages = new Array( 
    "<img src='http://rainbow.arch.scriptmania.com/scripts/ghost3.gif'>",
    "<img src='http://rainbow.arch.scriptmania.com/scripts/ghost1.gif'>",
    "<img src='http://rainbow.arch.scriptmania.com/scripts/ghost2.gif'>",
    "<img src='http://rainbow.arch.scriptmania.com/scripts/ghost2.gif'>"
);
var ns4 = document.layers;
var ie4 = document.all;
Halloween.makeLayer = function(id)
{
    var el =     document.getElementById    ? document.getElementById(id) :
            document.all         ? document.all[id] :
                              document.layers[id];
    if(ns4) el.style=el;
    el.sP=function(x,y){this.style.left = x;this.style.top=y;};
    el.show=function(){ this.style.visibility = "visible"; } 
    el.hide=function(){ this.style.visibility = "hidden"; } 
    if(ns4 || window.opera) 
        el.sO = function(pc){return 0;};
    else if(ie4)
        el.sO = function(pc)
        {
            if(this.style.filter=="")
                this.style.filter="alpha(opacity=100);";
            this.filters.alpha.opacity=pc;
        }
    else
        el.sO = function(pc){this.style.MozOpacity=pc/100;}

    return el;
}

if(window.innerWidth)
{
    gX=function(){return innerWidth;};
    gY=function(){return innerHeight;};
}
else
{
    gX=function(){return document.body.clientWidth-30;};
    gY=function(){return document.body.clientHeight-30;};
}
Halloween.ghostOutput=function()
{
    for(var i=0 ; i<Halloween.ghostImages.length ; i++)
        document.write(ns4 ? "<LAYER  NAME='gh"+i+"'>"+Halloween.ghostImages[i]+"</LAYER>" : 
                       "<DIV id='gh"+i+"' style='position:absolute'>"+Halloween.ghostImages[i]+"</DIV>" );
    
}
Halloween.ghostSprites = new Array();
Halloween.ghostStartAni = function()
{
    for(var i=0 ;i<Halloween.ghostImages.length;i++)
    {
        var el=Halloween.makeLayer("gh"+i);
        el.x=Math.random()*gX();
        el.y=Math.random()*gY();
        el.tx=Math.random()*gX();
        el.ty=Math.random()*gY();
        el.dx=-5+Math.random()*10;
        el.dy=-5+Math.random()*10;
        el.state="off";
        el.op=0;
        el.sO(el.op);
        el.hide();
        Halloween.ghostSprites[i] = el;
    }
    setInterval("Halloween.ghostAni()", 40);
}
Halloween.ghostAni = function()
{
    for(var i=0 ;i<Halloween.ghostSprites.length;i++)
    {
        el=Halloween.ghostSprites[i];

        if(el.state == "off")
        {
            if(Math.random() > .99)
            {
                el.state="up";
                el.show();
            }
        }
        else if(el.state == "on")
        {
            if(Math.random() > .98)
                el.state="down";
        }
        else if(el.state == "up")
        {
            el.op += 2;
            el.sO(el.op);
            if(el.op==100)
                el.state = "on";
        }
        else if(el.state == "down")
        {
            el.op -= 2;
            if(el.op==0)
            {
                el.hide();
                el.state = "off";
            }
            else
                el.sO(el.op);
        }

        var X = (el.tx - el.x);
        var Y = (el.ty - el.y);
        var len = Math.sqrt(X*X+Y*Y);
        if(len < 1) len = 1;
        var dx = 20 * (X/len);
        var dy = 20 * (Y/len);
        var ddx = (dx - el.dx)/10;
        var ddy = (dy - el.dy)/10;
        el.dx += ddx;
        el.dy += ddy;
        el.sP(el.x+=el.dx,el.y+=el.dy);

        if(Math.random() >.95 )
        {
            el.tx = Math.random()*gX();
            el.ty = Math.random()*gY();
        }

    }
}
Halloween.ghostStart = function()
{
    if(Halloween.ghostLoad)Halloween.ghostLoad();
    Halloween.ghostStartAni();
}
Halloween.ghostOutput();
Halloween.ghostLoad=window.onload;
window.onload=Halloween.ghostStart;

</SCRIPT>

Izuzetno atraktivna skripta......


snap201107082217.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
EFEKAT PADAJUCIH SRCA

Mozete takodje napraviti efekat i dobiti srca koja padaju (ili mozete ubaciti link slike odgovarajuce po zelji ).Potrebno je samo kopirati ovu java skriptu u vas html fajl u okviru body dela (<body> java skripta </body> ).Skripta je sledeca......

PHP:
<SCRIPT type="text/javascript">
/*
Hearts Fall 1 - Drifter - JavaScript
Visit www.rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/

// **** Changed to Hearts from Snow ****

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=12

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD","#ffffff","#ffc0cb")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// **** CHANGE YOUR IMAGE HERE ****

// Set the letter that creates your snowflake (recommended: * )
var snowletter=" <img src=http://rainbow.arch.scriptmania.com/scripts/bg/heart9.gif> "

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=40

// Set the minimal-size of your snowflaxes
var snowminsize=30

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera

function randommaker(range) {
    rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
    if (ie5 || opera) {
      marginbottom = document.body.clientHeight
      marginright = document.body.clientWidth
   }
   else if (ns6) {
      marginbottom = window.innerHeight
      marginright = window.innerWidth
   }
    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
        crds[i] = 0;
        lftrght[i] = Math.random()*15;
        x_mv[i] = 0.03 + Math.random()/10;
        snow[i]=document.getElementById("s"+i)
        snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
        snow[i].size=randommaker(snowsizerange)+snowminsize
        snow[i].style.fontSize=snow[i].size
        snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
        snow[i].sink=sinkspeed*snow[i].size/5
        if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
        if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
        if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
        if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
        snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
        snow[i].style.left=snow[i].posx
        snow[i].style.top=snow[i].posy
    }
    movesnow()
}

function movesnow() {
    for (i=0;i<=snowmax;i++) {
        crds[i] += x_mv[i];
        snow[i].posy+=snow[i].sink
        snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
        snow[i].style.top=snow[i].posy

        if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
            if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
            if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
            if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
            if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
            snow[i].posy=0
        }
    }
    var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
    window.onload=initsnow
}
</script>



snap201107082224.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
DUGME KA ZELJENOJ WEB STRANICI

Mozete postaviti dugme koje ce klikom na njega odvesti vas na zeljenu web stranicu.Skripta se sastoji iz dva dela i to potrebno je iskopirati java skriptu u okviru vaseg head dela (<head> java skripta </head> ).Skripta glasi.....

PHP:
<center>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
hexColor = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];
function mOver() {
for (i = 0; i < 13; i++) {
setTimeout('document.myForm.button.style.background = "#'+hexColor[12-i]+'0'+hexColor[12-i]+'0c0";', i * 40);
   }
}
function mOut() {
document.myForm.button.value = "  KLIKNI!  ";
for (i = 0; i < 12; i++) {
setTimeout('document.myForm.button.style.background = "#'+hexColor[i]+'0'+hexColor[i]+'0c0";', i * 40);
   }
}
//  End -->
</SCRIPT>
</center>

Takodje zatim je potrebno i u body delu iskopirati java skriptu (<body> java skripta </bodY> ) sledece sadrzine...

PHP:
<form name=myForm>
<center><input type=button name=button value="  KLIKNI!  " onMouseOver='mOver()'' onMouseDown='document.myForm.button.value="HVALA!"' onClick='window.location="http://www.serbianforum.org"' onMouseOut='mOut()'>
</form></center>


Podesen je vec naziv dugmeta na nasem jeziku a vi mozete pronmeniti po zelji i umesto linka serbianforuma staviti zeljeni na koje ce klikom na dugme da vas odvede.


snap201107082234.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
ISKACUCI PROZORI

Mozete takodje postaviti u okviru vaseg html fajla i pojavljivanje iskacucih prozora sa raznoraznim pitanjima koja naravno vi zelite postaviti.potrebno je samo da u okviru vaseg body dela postavite java skriptu.....

PHP:
<BODY onLoad="alert('DOBRODOSLI NA SERBIANFORUM!!!');" onUnLoad="confirm('Dali zelite da napustite stranicu?');">

Naravno pitanja u iskacucem prozoru postavljate po zelji

snap201107082243.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
KOMETA U MISU

Mozete jednom java skriptom pomeranjem misa proizvoditi evekat komete.potrebno je da u okviru vaseg body dela html fajla iskopirate i postavite sledecu java skriptu.....

PHP:
<SCRIPT language=JavaScript>

//  Comet trail script
//  Visit www.rainbow.arch.scriptmania.com
//  for this script and more

colours=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','ff00ff')
n = 30;
y = 0;
x = 0;
n6=(document.getElementById&&!document.all);
ns=(document.layers);
ie=(document.all);
d=(ns||ie)?'document.':'document.getElementById("';
a=(ns||n6)?'':'all.';
n6r=(n6)?'")':'';
s=(ns)?'':'.style';
if (ns){
for (i = 0; i < n; i++)
document.write('<layer name="dots'+i+'" top=0 left=0 width='+i/2+' height='+i/2+' bgcolor=#ff0000></layer>');
}
if (ie)
document.write('<div id="con" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
if (ie||n6){
for (i = 0; i < n; i++)
document.write('<div id="dots'+i+'" style="position:absolute;top:0px;left:0px;width:'+i/2+'px;height:'+i/2+'px;background:#ff0000;font-size:'+i/2+'"></div>');
}
if (ie)
document.write('</div></div>');
(ns||n6)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
y = (ns||n6)?evnt.pageY+4 - window.pageYOffset:event.y+4;
x = (ns||n6)?evnt.pageX+1:event.x+1;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function animate(){
o=(ns||n6)?window.pageYOffset:0;
if (ie)con.style.top=document.body.scrollTop;
for (i = 0; i < n; i++){
var temp1 = eval(d+a+"dots"+i+n6r+s);

randcolours = colours[Math.floor(Math.random()*colours.length)];
(ns)?temp1.bgColor = randcolours:temp1.background = randcolours; 
if (i < n-1){
 var temp2 = eval(d+a+"dots"+(i+1)+n6r+s);
 temp1.top = parseInt(temp2.top);
 temp1.left = parseInt(temp2.left);
 } 
else{
 temp1.top = y+o;
 temp1.left = x;
 }
}
setTimeout("animate()",10);
}
animate();
// -->
</SCRIPT>

Mozete sami odesavanjem u okviru skripte odrediti brzinu pomeranja komete za misem kao i njenu velicinu.
snap201107082247.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SETAJUCI KRUG

Mozete u okviru vaseg html fajla i postaviti krug koji stalno seta u raznim pravcima,menja oblik i boju.Potrebno je da iskopirate sledecu java skriptu u okviru vaseg html fajla a iznad zavrsnog </html> taga.Skripta izgleda ovako...

PHP:
<SCRIPT LANGUAGE="JavaScript">
<!-- Crazy Circle from Rainbow Arch -->
<!-- This script and many more from : -->
 <!-- http://rainbow.arch.scriptmania.com -->

 <!-- Crazy Circle from http://rainbow.arch.scriptmania.com
colrs=new Array('ff0000','ff8000','ffff00','00ff00','00ffff','0000ff','8000ff');
n=14;
n4=(document.layers);
n6=(document.getElementById&&!document.all);
ie=(document.all);
if (n4){
for (i=0; i < n; i++)
document.write('<layer name="stars'+i+'" bgcolor='+colrs[0]+' clip="0,0,2,2"></layer>');
}
else{
for (i=0; i < n; i++)
document.write('<span id="stars'+i+'" style="position:absolute;top:0;left:0;width:2px;height:2px;background:#'+colrs[0]+';font-size:2px"></span>');
}
e=Math.round(360/n);
d=(n4||ie)?'document.':'document.getElementById("';
a=(n4||n6)?'':'all.';
r=(n6)?'")':'';
s=(n4)?'':'.style';
y=0;
x=0;
c1=0.05;
cs1=0;
c2=0.1;
cs2=0;
b=70;
pos1=0;
pos2=0;
move=1;
function colourStep(){
var temp=eval(d+a+"stars"+pos1+r+s);
pos1+=move;
if (pos1 >= n) {pos1=0;pos2+=move}
if (pos2 == colrs.length) pos2=0;
(n4)?temp.bgColor=colrs[pos2]:temp.background='#'+colrs[pos2];
}
function fly(){
h=(n4||n6)?window.innerHeight:document.body.offsetHeight;
w=(n4||n6)?window.innerWidth:document.body.offsetWidth;
sy=(n4||n6)?window.pageYOffset:document.body.scrollTop;
sx=(n4||n6)?window.pageXOffset:document.body.scrollLeft;
v=(n4||n6)?3:3;
y=sy+h/2+h/v*Math.cos((cs2)/3)*Math.cos(cs2/50);
x=sx+w/2+w/2.4*Math.sin((cs2)/5)*Math.cos(cs2/30);
cs2+=c2;
}
function CircleSpin(){
for (i=0; i < n; i++){
var divs=eval(d+a+"stars"+i+r+s);
divs.top=y+b*Math.cos(cs1+i*e*Math.PI/180)*Math.cos(cs1/3)*Math.sin(cs1/6);
divs.left=x+b*Math.sin(cs1+i*e*Math.PI/180)*Math.cos(cs1/6);
}
cs1-=c1;
fly();
colourStep();
setTimeout("CircleSpin()",10);
}
if (ie||n4||n6)CircleSpin();
// -->
</SCRIPT>

Mozete sami raditi podesavanja poput brzine,velicine kruga u okviru same skripte.....



snap201107082256.jpg
 
Poslednja izmena:
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
KUGLICE U MISU

Mozete napraviti mis efekat u okviru vaseg html fajla tako sto cete pomerati mis a za njim ce ici kuglice i pratiti ga.Dovoljno je da u okviru vaseg body dela html fajla iskopirate sledecu java skriptu.....
PHP:
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;"></div>
<div id="dot1" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt=""></div>
<div id="dot2" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt="."></div>
<div id="dot3" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt="."></div>
<div id="dot4" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt="."></div>
<div id="dot5" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt="."></div>
<div id="dot6" style="position: absolute; height: 35; width: 35;"><img src="http://rainbow.arch.scriptmania.com/scripts/ball1.gif" width="11" height="11" alt="."></div>

<script type='text/javascript'>

<!-- This script and many more from -->
<!-- http://rainbow.arch.scriptmania.com -->

<!-- Begin
var nDots = 7;
if (document.all&&window.print)
document.body.style.cssText="overflow-x:hidden;overflow-y:scroll"
var Xpos = 0;
var Ypos = 0;


var DELTAT = .01;
var SEGLEN = 10;
var SPRINGK = 10;
var MASS = 1;
var GRAVITY = 50;
var RESISTANCE = 10;
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 35;
var BOUNCE = 0.75;

var isNetscape = navigator.appName=="Netscape";

var followmouse = true;

var dots = new Array();
init();
function init()
{
    var i = 0;
    for (i = 0; i < nDots; i++) {
        dots[i] = new dot(i);
    }
    
     for (i = 0; i < nDots; i++) {
        dots[i].obj.left = dots[i].X + "px";
        dots[i].obj.top = dots[i].Y + "px";
    }
    
    if (isNetscape) {
        startanimate();
    } else {
        setTimeout("startanimate()", 20);
    }
}

function dot(i) 
{
    this.X = Xpos;
    this.Y = Ypos;
    this.dx = 0;
    this.dy = 0;
    this.obj = eval("document.getElementById('dot" + i + "').style");
}

document.onmousemove = MoveHandler;

function startanimate() {    
    setInterval("animate()", 20);
}

function MoveHandler(e) {

    if (!e) {
        Xpos = window.event.x + document.body.scrollLeft;
        Ypos = window.event.y + document.body.scrollTop;
    } else {
        Xpos = e.pageX;
        Ypos = e.pageY;
    }
}

function vec(X, Y)
{
    this.X = X;
    this.Y = Y;
}

function springForce(i, j, spring)
{
    var dx = (dots[i].X - dots[j].X);
    var dy = (dots[i].Y - dots[j].Y);
    var len = Math.sqrt(dx*dx + dy*dy);
    if (len > SEGLEN) {
        var springF = SPRINGK * (len - SEGLEN);
        spring.X += (dx / len) * springF;
        spring.Y += (dy / len) * springF;
    }
}

function animate() {    
     var start = 0;
    if (followmouse) {
        dots[0].X = Xpos;
        dots[0].Y = Ypos;
        start = 1;
    }
    
    for (i = start ; i < nDots; i++ ) {
        
        var spring = new vec(0, 0);
        if (i > 0) {
            springForce(i-1, i, spring);
        }
        if (i < (nDots - 1)) {
            springForce(i+1, i, spring);
        }
        
         var resist = new vec(-dots[i].dx * RESISTANCE,
            -dots[i].dy * RESISTANCE);
        
         var accel = new vec((spring.X + resist.X)/ MASS,
            (spring.Y + resist.Y)/ MASS + GRAVITY);
        
          dots[i].dx += (DELTAT * accel.X);
        dots[i].dy += (DELTAT * accel.Y);
        
          if (Math.abs(dots[i].dx) < STOPVEL &&
            Math.abs(dots[i].dy) < STOPVEL &&
            Math.abs(accel.X) < STOPACC &&
            Math.abs(accel.Y) < STOPACC) {
            dots[i].dx = 0;
            dots[i].dy = 0;
        }
        
         dots[i].X += dots[i].dx;
        dots[i].Y += dots[i].dy;

         var height, width;
        if (isNetscape) {
            height = window.innerHeight + document.scrollTop;
            width = window.innerWidth + document.scrollLeft;
        } else {    
            height = document.body.clientHeight + document.body.scrollTop;
            width = document.body.clientWidth + document.body.scrollLeft;
        }
        
        if (dots[i].Y >=  height - DOTSIZE - 1) {
            if (dots[i].dy > 0) {
                dots[i].dy = BOUNCE * -dots[i].dy;
            }
            dots[i].Y = height - DOTSIZE - 1;
        }
        if (dots[i].X >= width - DOTSIZE) {
            if (dots[i].dx > 0) {
                dots[i].dx = BOUNCE * -dots[i].dx;
            }
            dots[i].X = width - DOTSIZE - 1;
        }
        if (dots[i].X < 0) {
            if (dots[i].dx < 0) {
                dots[i].dx = BOUNCE * -dots[i].dx;
            }
            dots[i].X = 0;
        }
        
        dots[i].obj.left = dots[i].X + "px";
        dots[i].obj.top =  dots[i].Y + "px";
    }
}
// End -->
</SCRIPT>

Umesto kuflica mozete postaviti takodje sta god zelite sto ce ici za misem ,potrebno je u samom vrhu skripte postaviti na sest mesta link od slicice koju hocete da ide za misem......


snap201107082308.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
PADANJE LISCA

Ako zelite docarati efekat padanja lisca u vasem htlm fajlu to mozete jednostavno i uraditi pomocu sledece java skripte.Potrebno je ovu skriptu da iskopirate u okviru body dela vaseg htlm fajla.Skripta izgleda ovako.....

PHP:
<SCRIPT type="text/javascript" language="JavaScript1.2">
/*
Autumn Fall Timeout JavaScript
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/
 
//Pre-loads your images below
//Configure below - change URL path to your images

grphcs=new Array(8)
Image0=new Image();
Image0.src=grphcs[0]="http://rainbow.arch.scriptmania.com/scripts/bg/oak3.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://rainbow.arch.scriptmania.com/scripts/bg/dlv.gif"
Image2=new Image();
Image2.src=grphcs[2]="http://rainbow.arch.scriptmania.com/scripts/bg/oak3.gif"
Image3=new Image();
Image3.src=grphcs[3]="http://rainbow.arch.scriptmania.com/scripts/bg/oak3.gif"
Image4=new Image();
Image4.src=grphcs[4]="http://rainbow.arch.scriptmania.com/scripts/bg/oak3.gif"
Image5=new Image();
Image5.src=grphcs[5]="http://rainbow.arch.scriptmania.com/scripts/bg/dlv.gif"
Image6=new Image();
Image6.src=grphcs[6]="http://rainbow.arch.scriptmania.com/scripts/bg/oak3.gif"
Image7=new Image();
Image7.src=grphcs[7]="http://rainbow.arch.scriptmania.com/scripts/bg/dlv.gif"

//Smoothness depends on image file size, 
//the smaller the size the more you can use!

// Configure below - change number of images 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;
var Stop = false; 

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(){
if (Stop) { clearLeaves(); return; }

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()',120);
}

window.onload=fall;

//  *****  Delay FUNCTION HERE  *****

setTimeout("Stop=true", 20000);  //  *****  Delay 1000 = 1 second  *****

function clearLeaves(){
for (i=0; i < Amount; i++){
if (ns){
document.layers['sn'+i].display='none';
}
else if (ns6){
document.getElementById("si"+i).style.display='none';
}
else{
eval("document.all.si"+i).style.display='none';
}
}
}
//-->
</SCRIPT>

Gustinu padanja i brzinu takodje stelujete sami po zelju u okviru ove skripte

snap201107082319.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
EFEKAT MECAVE

Mozete postaviti u vas htlm fajl efekat jakog i krupnog padanja snega.Potrebno je u body deo vaseg html fajla da iskopirate sledecu java skriptu.....

PHP:
<SCRIPT type="text/javascript" language="JavaScript1.2">
/*
Snow Fall Timout JavaScript
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/
 
//Pre-loads your image/s below
//Configure below - change URL path to your snow images

grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="http://rainbow.arch.scriptmania.com/scripts/bg/snow.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://rainbow.arch.scriptmania.com/scripts/bg/snow1.gif"
Image2=new Image();
Image2.src=grphcs[2]="http://rainbow.arch.scriptmania.com/scripts/bg/snow7.gif"
Image3=new Image();
Image3.src=grphcs[3]="http://rainbow.arch.scriptmania.com/scripts/bg/snow6.gif"
Image4=new Image();
Image4.src=grphcs[4]="http://rainbow.arch.scriptmania.com/scripts/bg/snow4.gif"
Image5=new Image();
Image5.src=grphcs[5]="http://rainbow.arch.scriptmania.com/scripts/bg/snow2.gif"

//Smoothness depends on image file size, 
//the smaller the size the more you can use!

// Configure below - change number of snow to render
Amount=40; 

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;
var Stop = false; 

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(){
if (Stop) { clearSnow(); return; }

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()',20);
}

window.onload=fall;

//  *****  Delay FUNCTION HERE  *****

setTimeout("Stop=true", 20000);  //  *****  Delay 1000 = 1 second  *****

function clearSnow(){
for (i=0; i < Amount; i++){
if (ns){
document.layers['sn'+i].display='none';
}
else if (ns6){
document.getElementById("si"+i).style.display='none';
}
else{
eval("document.all.si"+i).style.display='none';
}
}
}
//-->
</SCRIPT>

Kolicinu pahulja,brzinu njihovog padanja takodje stelujete po zelji a u okviru same skripte.


snap201107082339.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SNEG EFEKAT

Ako zelite postaviti u vasem html fajlu diskretno padanje snega to mozete uraditi tako sto cete java skriptu iskopirati u okviru body dela vaseg html fajla.Java skripta je sledeca.....

PHP:
<SCRIPT type="text/javascript">
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Times","Arial","Times","Verdana")

// Set the letter that creates your snowflake (recommended: * )
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximum-size of your snowflakes
var snowmaxsize=30

// Set the minimal-size of your snowflakes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera

function randommaker(range) {
        rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
        if (ie5 || opera) {
                marginbottom = document.body.scrollHeight
                marginright = document.body.clientWidth-15
        }
        else if (ns6) {
                marginbottom = document.body.scrollHeight
                marginright = window.innerWidth-15
        }
        var snowsizerange=snowmaxsize-snowminsize
        for (i=0;i<=snowmax;i++) {
                crds[i] = 0;
            lftrght[i] = Math.random()*15;
            x_mv[i] = 0.03 + Math.random()/10;
                snow[i]=document.getElementById("s"+i)
                snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
                snow[i].size=randommaker(snowsizerange)+snowminsize
                snow[i].style.fontSize=snow[i].size+'px';
                snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
                snow[i].style.zIndex=1000
                snow[i].sink=sinkspeed*snow[i].size/5
                if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
                snow[i].style.left=snow[i].posx+'px';
                snow[i].style.top=snow[i].posy+'px';
        }
        movesnow()
}

function movesnow() {
        for (i=0;i<=snowmax;i++) {
                crds[i] += x_mv[i];
                snow[i].posy+=snow[i].sink
                snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i])+'px';
                snow[i].style.top=snow[i].posy+'px';

                if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
                        if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                        if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                        if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                        if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                        snow[i].posy=0
                }
        }
        var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
        document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
        window.onload=initsnow
}

</SCRIPT>

Po vasem nahodjenju mozete odabrati broj pahulja i brzinu padanja istih u okviru same java skripte


snap201107082344.jpg
 
Natrag
Top