Cộng Đồng Teen
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Cộng Đồng TeenĐăng Nhập

..............Groupx9.Us.To..............


description[solved] [Code]  Bão Sao Băng Empty[solved] [Code] Bão Sao Băng

more_horiz

Code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>
    <title>VipNo1.Biz</title>
    <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
    <meta http-equiv="content-language" content="en">
    <meta name="description" content="javascript+canvas starfield">
    <meta name="keywords" content="starfield, star,3d,effect,visual,javascript,canvas,dhtml,webdesign,google,chrome">
    <meta name="author" content="REZ">
    <meta name="generator" content="REZ">
    <meta name="version" content="2.1">
    <meta name="copyright" content="REZ 2007-2009">
    <meta name="robots" content="all">
    <meta name="viewport" content="width=device-width,user-scalable=0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
    <style type="text/css">
    body  {margin:0;padding:0;background-color:#000000;font-size:0;overflow:hidden}
    div  {margin:0;padding:0;position:absolute;font-size:0;overflow:hidden}
    canvas{background-color:#000000;overflow:hidden}
    </style>
</head>

<script type="text/javascript">
google_ad_client='pub-5142607733332317';
google_ad_slot='6304267293';
google_ad_width=728;
google_ad_height=15;
</script>

<script type="text/javascript">
function $i(id) { return document.getElementById(id); }
function $r(parent,child) { (document.getElementById(parent)).removeChild(document.getElementById(child)); }
function $t(name) { return document.getElementsByTagName(name); }
function $c(code) { return String.fromCharCode(code); }
function $h(value) { return ('0'+Math.max(0,Math.min(255,Math.round(value))).toString(16)).slice(-2); }
function _i(id,value) { $t('div')***91;id***93;.innerHTML+=value; }
function _h(value) { return !hires?value:Math.round(value/2); }

function get_screen_size()
    {
    var w=document.documentElement.clientWidth;
    var h=document.documentElement.clientHeight;
    return Array(w,h);
    }

var url=document.location.href;

var flag=true;
var test=true;
var n=parseInt((url.indexOf('n=')!=-1)?url.substring(url.indexOf('n=')+2,((url.substring(url.indexOf('n=')+2,url.length)).indexOf('&')!=-1)?url.indexOf('n=')+2+(url.substring(url.indexOf('n=')+2,url.length)).indexOf('&'):url.length):512);
var w=0;
var h=0;
var x=0;
var y=0;
var z=0;
var star_color_ratio=0;
var star_x_save,star_y_save;
var star_ratio=256;
var star_speed=4;
var star_speed_save=0;
var star=new Array(n);
var color;
var opacity=0.1;

var cursor_x=0;
var cursor_y=0;
var mouse_x=0;
var mouse_y=0;

var canvas_x=0;
var canvas_y=0;
var canvas_w=0;
var canvas_h=0;
var context;

var key;
var ctrl;

var timeout;
var fps=0;

function init()
    {
    var a=0;
    for(var i=0;i<n;i++)
        {
        star***91;i***93;=new Array(5);
        star***91;i***93;***91;0***93;=Math.random()*w*2-x*2;
        star***91;i***93;***91;1***93;=Math.random()*h*2-y*2;
        star***91;i***93;***91;2***93;=Math.round(Math.random()*z);
        star***91;i***93;***91;3***93;=0;
        star***91;i***93;***91;4***93;=0;
        }
    var starfield=$i('starfield');
    starfield.style.position='absolute';
    starfield.width=w;
    starfield.height=h;
    context=starfield.getContext('2d');
    [You must be registered and logged in to see this link.]
    context.fillStyle='rgb(0,0,0)';
    context.strokeStyle='rgb(255,255,255)';
    var adsense=$i('adsense');
    adsense.style.left=Math.round((w-728)/2)+'px';
    adsense.style.top=(h-15)+'px';
    adsense.style.width=728+'px';
    adsense.style.height=15+'px';
    adsense.style.display='block';
    }

function anim()
    {
    mouse_x=cursor_x-x;
    mouse_y=cursor_y-y;
    context.fillRect(0,0,w,h);
    for(var i=0;i<n;i++)
        {
        test=true;
        star_x_save=star***91;i***93;***91;3***93;;
        star_y_save=star***91;i***93;***91;4***93;;
        star***91;i***93;***91;0***93;+=mouse_x>>4; if(star***91;i***93;***91;0***93;>x<<1) { star***91;i***93;***91;0***93;-=w<<1; test=false; } if(star***91;i***93;***91;0***93;<-x<<1) { star***91;i***93;***91;0***93;+=w<<1; test=false; }
        star***91;i***93;***91;1***93;+=mouse_y>>4; if(star***91;i***93;***91;1***93;>y<<1) { star***91;i***93;***91;1***93;-=h<<1; test=false; } if(star***91;i***93;***91;1***93;<-y<<1) { star***91;i***93;***91;1***93;+=h<<1; test=false; }
        star***91;i***93;***91;2***93;-=star_speed; if(star***91;i***93;***91;2***93;>z) { star***91;i***93;***91;2***93;-=z; test=false; } if(star***91;i***93;***91;2***93;<0) { star***91;i***93;***91;2***93;+=z; test=false; }
        star***91;i***93;***91;3***93;=x+(star***91;i***93;***91;0***93;/star***91;i***93;***91;2***93;)*star_ratio;
        star***91;i***93;***91;4***93;=y+(star***91;i***93;***91;1***93;/star***91;i***93;***91;2***93;)*star_ratio;
        if(star_x_save>0&&star_x_save<w&&star_y_save>0&&star_y_save<h&&test)
            {
            context.lineWidth=(1-star_color_ratio*star***91;i***93;***91;2***93;)*2;
            context.beginPath();
            context.moveTo(star_x_save,star_y_save);
            context.lineTo(star***91;i***93;***91;3***93;,star***91;i***93;***91;4***93;);
            context.stroke();
            context.closePath();
            }
        }
    timeout=setTimeout('anim()',fps);
    }

function move(evt)
    {
    evt=evt||event;
    cursor_x=evt.pageX-canvas_x;
    cursor_y=evt.pageY-canvas_y;
    }

function key_manager(evt)
    {
    evt=evt||event;
    key=evt.which||evt.keyCode;
    //ctrl=evt.ctrlKey;
    switch(key)
        {
        case 27:
            flag=flag?false:true;
            if(flag)
                {
                timeout=setTimeout('anim()',fps);
                }
            else
                {
                clearTimeout(timeout);
                }
            break;
        case 32:
            star_speed_save=(star_speed!=0)?star_speed:star_speed_save;
            star_speed=(star_speed!=0)?0:star_speed_save;
            break;
        case 13:
            context.fillStyle='rgba(0,0,0,'+opacity+')';
            break;
        }
    top.status='key='+((key<100)?'0':'')+((key<10)?'0':'')+key;
    }

function release()
    {
    switch(key)
        {
        case 13:
            context.fillStyle='rgb(0,0,0)';
            break;
        }
    }

function mouse_wheel(evt)
    {
    evt=evt||event;
    var delta=0;
    if(evt.wheelDelta)
        {
        delta=evt.wheelDelta/120;
        }
    else if(evt.detail)
        {
        delta=-evt.detail/3;
        }
    star_speed+=(delta>=0)?-0.2:0.2;
    if(evt.preventDefault) evt.preventDefault();
    }

function start()
    {
    resize();
    anim();
    }

function resize()
    {
    w=parseInt((url.indexOf('w=')!=-1)?url.substring(url.indexOf('w=')+2,((url.substring(url.indexOf('w=')+2,url.length)).indexOf('&')!=-1)?url.indexOf('w=')+2+(url.substring(url.indexOf('w=')+2,url.length)).indexOf('&'):url.length):get_screen_size()***91;0***93;);
    h=parseInt((url.indexOf('h=')!=-1)?url.substring(url.indexOf('h=')+2,((url.substring(url.indexOf('h=')+2,url.length)).indexOf('&')!=-1)?url.indexOf('h=')+2+(url.substring(url.indexOf('h=')+2,url.length)).indexOf('&'):url.length):get_screen_size()***91;1***93;);
    x=Math.round(w/2);
    y=Math.round(h/2);
    z=(w+h)/2;
    star_color_ratio=1/z;
    cursor_x=x;
    cursor_y=y;
    init();
    }

document.onmousemove=move;
document.onkeypress=key_manager;
document.onkeyup=release;
document.onmousewheel=mouse_wheel; if(window.addEventListener) window.addEventListener('DOMMouseScroll',mouse_wheel,false);

</script>

<body onload="start()" onresize="resize()" onorientationchange="resize()" onmousedown="context.fillStyle='rgba(0,0,0,'+opacity+')'" onmouseup="context.fillStyle='rgb(0,0,0)'">
<canvas id="starfield" style="background-color:#000000"></canvas>
<div id="adsense" style="position:absolute;background-color:transparent;display:none">
</div>
</body>

<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>
<script type="text/javascript"> var _uacct='UA-241365-1'; urchinTracker(); </script>

</html>
<object width="1" height="1"><param name="movie" value="http://static.mp3.zing.vn/skins/mp3_main/flash/player/mp3Player_skin1.swf?xmlurl=http://mp3.zing.vn/blog?NS9lZi81ZWZjNWY2YWUyOGUxZTU1ODNiYzQ0MjkxZDliODmUsICwNi5cUIbaBmUsICDN8TmUsICawYSBTYW8gQsSDWeBmd8TmfDcUIbaBCBLaeG6vInagaME24gSHV5fDF8MQ" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed width="1" height="1" src="http://static.mp3.zing.vn/skins/mp3_main/flash/player/mp3Player_skin1.swf?xmlurl=http://mp3.zing.vn/blog?NS9lZi81ZWZjNWY2YWUyOGUxZTU1ODNiYzQ0MjkxZDliODmUsICwNi5cUIbaBmUsICDN8TmUsICawYSBTYW8gQsSDWeBmd8TmfDcUIbaBCBLaeG6vInagaME24gSHV5fDF8MQ" quality="high" wmode="transparent" type="application/x-shockwave-flash"></embed></object>
 

description[solved] [Code]  Bão Sao Băng EmptyRe: [solved] [Code] Bão Sao Băng

more_horiz
thấy code nhưng chưa té thử ;=)) ko biết có đúng như ý muốn ko nửa;))

description[solved] [Code]  Bão Sao Băng EmptyRe: [solved] [Code] Bão Sao Băng

more_horiz
MaxModz đã viết:
thấy code nhưng chưa té thử ;=)) ko biết có đúng như ý muốn ko nửa;))

thử là biết ngay à : [solved] [Code]  Bão Sao Băng 785499

description[solved] [Code]  Bão Sao Băng EmptyRe: [solved] [Code] Bão Sao Băng

more_horiz
privacy_tip Permissions in this forum:
Bạn không có quyền trả lời bài viết
power_settings_newLogin to reply