Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    114

    Free JavaSccript codes

    Helpful JavaScripts to develop website

    VML fireworks script

    This is an interesting fireworks effect with the following attributes:

    + Makes use of VML support in IE5+ to render the stars. No graphics involved.
    + Uses conditional... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Place CSS below in your HEAD section
    CSS
    Code:
    <STYLE type=text/css>BODY {
    	OVERFLOW-X: hidden
    }
    v\:* {
    	BEHAVIOR: url(#default#VML)
    }
          </STYLE>
    	<!--
        	This script downloaded from www.JavaScriptBank.com
        	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
    	-->
    Step 2: Place JavaScript below in your HEAD section
    JavaScript
    Code:
    <!--[if IE ]>
    <SCRIPT language=JavaScript>
    // VML fireworks script By Jacco IJzerman , j.ijzerman1@chello.nl
    //Customize fireworks colors:
    colors = new Array();
    colors[0] = new Array('yellow', 'lime');
    colors[1] = new Array('lime', 'green')
    colors[2] = new Array('lime', 'blue');
    colors[3] = new Array('lightyellow', 'purple');
    colors[4] = new Array('lightblue', 'white');
    colors[5] = new Array('blue', 'silver');
    colors[6] = new Array('red', 'fuchsia');
    colors[7] = new Array('yellow', 'red');
    
    maximum = 1000;
    
    vmlobj=''; 
    for(i = 0; i < 12; i++){ 
    vmlobj += '<div id="ster'+i+'" style="position:absolute; left:-50px; top-50px; visibility:hidden; z-index:50;">';
    vmlobj += '<v:shape style="width:15px; height:15px;" fillcolor="yellow" coordorigin="0,0" coordsize="200 200">';
    vmlobj += '<v:path v="m 8,65 l 72,65, 92,11, 112,65, 174,65, 122,100, 142,155,92,121, 42,155, 60,100 x e"/>';
    vmlobj += '<v:stroke on="false" /></v:shape></div>';
    }
    document.write(vmlobj); vmlobj = null;
    
    aantal = 0;
    
    function begin()
    {
    try {
    if(aantal == maximum){ return;}
    kleurschema = Math.floor(Math.random() * colors.length);
    posLinks = Math.floor(Math.random() * (document.body.clientWidth - 180));
    posLinks = (posLinks < 170)? 170: posLinks;
    posBoven = Math.floor(Math.random() * (document.body.clientHeight - 180));
    posBoven = (posBoven < 170)? 170: posBoven;
    straal = 0; uiteen = true; teller = 1; flikkereffect = false;
    for(var i = 0; i < 12; i++){
    document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][0]);
    document.getElementById('ster'+i).style.visibility = 'hidden'; // 5.0 fix
    document.getElementById('ster'+i).style.left = posLinks;
    document.getElementById('ster'+i).style.top = posBoven;
    }
    document.getElementById('ster0').style.top = (document.body.clientHeight - 20); 
    document.getElementById('ster0').style.visibility = 'visible';
    omhoog();
    } catch(e){}
    }
    
    function omhoog()
    {
    try {
    positie = parseInt(document.getElementById('ster0').style.top);
    if(positie > posBoven){
    document.getElementById('ster0').style.top = (positie - 25); 
    setTimeout('omhoog()', 50);
    } else {
    for(i = 1; i < 12; i++){
    document.getElementById('ster'+i).style.top = positie;
    document.getElementById('ster'+i).style.visibility = 'visible';
    } 
    uiteenspatten();
    }
    } catch(e){}
    }
    
    function uiteenspatten()
    {
    try {
    if(straal > 120 && straal % 10 == 0){ 
    flikkereffect = true;
    teller = (teller == colors[kleurschema].length)? 0: (teller+1);
    }
    for(var i = 0; i < 12; i++){
    var hoek = i * 30; 
    var piHoek = Math.PI - Math.PI / 180 * hoek;
    var links = posLinks + Math.round(straal * Math.sin(piHoek)); 
    var boven = positie + Math.round(straal * Math.cos(piHoek));
    document.getElementById('ster'+i).style.left = links;
    document.getElementById('ster'+i).style.top = boven;
    if(flikkereffect){
    document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][teller]);
    }
    }
    if(straal < 160 && uiteen){
    straal += (straal < 120)? 10: 5;
    setTimeout('uiteenspatten()', 50);
    }
    else if(straal > 120){
    uiteen = false; straal -= 5;
    setTimeout('uiteenspatten()', 50);
    }
    else if(straal <= 120){
    for(var i = 0; i < 12; i++){
    document.getElementById('ster'+i).style.visibility = 'hidden';
    }
    aantal++;
    setTimeout('begin()', 500);
    }
    } catch(e) {}
    }
    
    window.onload=begin;
    
    </SCRIPT><![endif]-->
    	<!--
        	This script downloaded from www.JavaScriptBank.com
        	Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
    	-->





    JavaScript Bookmark Page script - JavaScript Color Wheel - JavaScript Image slideshow
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource.

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    10
    Yeah. It’s good to be yourself. Same with you, I will try to do something. So I support your decision!


    __________________
    Baby Monitor

  3. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    17
    Thank's, guys..
    That was really nice Jscript.

  4. #4
    Registered User
    Join Date
    Feb 2010
    Posts
    7
    Thanks..... You post a fabulous info and the tips are great........Good work keep it up.
    _____________________________________
    Web Design London

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.