14
Nov
2009
Nov
2009
Cara membuat efek kembang api
Posted by: adminCara membuat efek kembang api pada blog.
Ingin si do’i (blog kamu) ikut merayakan acara malam tahun baruan?
biar si dia gak kesepian tuh ditinggal sendirian dalam komputer..
Wkwkwkwk..
Demo:
Pasang kode javascript dibawah ini tepat di atas </body></html> pada halaman blog kamu.
Selamat mencoba!
Download kembang-api.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | <!--Cukup copy dan paste tepat di atas </body></html> pada halaman blog kamu--> <SCRIPT LANGUAGE="JavaScript"> <!-- Fireworks Effect if (document.getElementById){ // Plenty of black gives a better sparkle effect. showerCol=new Array('#000000','#ff0000','#ffffff','#000000','#00ff00','#ff00ff','#ffffff','#ffa500','#000000','#fff000'); launchCol=new Array('#ffff00','#ff00ff','#00ffff','#ffffff','#ff8000'); runSpeed=70; //setTimeout speed. // *** DO NOT EDIT BELOW *** var yPos=200; var xPos=200; var explosionSize=200; var launchColour='#ffff80'; var timer=null; var dims=1; var evn=360/14; firework=new Array(); var ieType=(typeof window.innerWidth != 'number'); var ieRef=((ieType) && (document.compatMode) && (document.compatMode.indexOf("CSS") != -1)) ?document.documentElement:document.body; thisStep=0; step=5; for (i=0; i < 14; i++){ document.write('<div id="sparks'+i+'" style="position:absolute;top:0px;left:0px;height:1px;width:1px;font-size:1px;background-color:'+launchColour+'"><\/div>'); firework[i]=document.getElementById("sparks"+i).style; } function winDims(){ winH=(ieType)?ieRef.clientHeight:window.innerHeight; winW=(ieType)?ieRef.clientWidth:window.innerWidth; bestFit=(winW >= winH)?winH:winW; } winDims(); window.onresize=new Function("winDims()"); function Reset(){ var dsy=(ieType)?ieRef.scrollTop:window.pageYOffset; thisStep=-1; launchColour = launchCol[Math.floor(Math.random()*launchCol.length)]; explosionSize=Math.round(100+Math.random()*(bestFit/4)); yPos = explosionSize+Math.round(Math.random()*(winH-(explosionSize*2.2)))+dsy; xPos = explosionSize+Math.round(Math.random()*(winW-(explosionSize*2.2))); dims=1; for (i=0; i < 14; i++){ firework[i].backgroundColor=launchColour; firework[i].width=dims+"px"; firework[i].height=dims+"px"; firework[i].fontSize=dims+"px"; } Fireworks(); } function Fireworks(){ thisStep+=step; timer=setTimeout("Fireworks()",runSpeed); for (i=0; i < 14; i++){ firework[i].top = yPos + explosionSize * Math.sin(i*evn*Math.PI/180)*Math.sin(thisStep/100)+"px"; firework[i].left= xPos + explosionSize * Math.cos(i*evn*Math.PI/180)*Math.sin(thisStep/100)+"px"; if (thisStep > 100){ dims=(explosionSize < 150)?1:Math.round(1+Math.random()*2); firework[i].backgroundColor=showerCol[Math.floor(Math.random()*showerCol.length)]; firework[i].width=dims+"px"; firework[i].height=dims+"px"; firework[i].fontSize=dims+"px"; } } if (thisStep > 160){ clearTimeout(timer); Reset(); } } window.onload=Fireworks; } //--> </SCRIPT> |

memuat halaman
iklan




Postingan yang lain:




boong loe….
mna bukti nya…..
maksud kamu bukti yg mana?
HUUUAAAAA
PENTING NIH ARITKEL
buad piet yang jauh sama bebz♥ku tercinta
hehehe
taun baruan beda tampat neghtt kita
hiikkkkzzz T.T
Hi, thanks for the tricks.
please visit my blog
Mantaff neh efek kembang apinya.
Kalo aku, jualan kembang api asli neh sob untuk memeriahkan acara2 khusus kamu, keluarga dan kawan2. Apalagi mau tahun baru neh.
tapi agak sepi… perciknya kekecilan… hehe…
Iya, efeknya kurang meriah. tapi gag apa-apadeh, yang penting ada. thx ya
kembang api-nya ko ngga muncul di blog saya… kira2 ada kendala lain ngga ya?!
mas nukayanime naruh kodenya bener gak..?
Nanti deh aku bikin postingan lagi
cara membuat efek kembang api 2 yg lebih meriah.. he.he.he..
cari2 scriptnya dulu..
bikin postingan barunya gak jadi deh, lihat kembang apinya disini aja http://aku-punya.com/frames/kembang-api-2.html
ini untuk dilihat aja, soalnya script yg ini harus punya hosting sendiri
ini untuk postingan atau tema blog?
efeknya bisa dipakai dipostingan bisa juga ditema blog
nanti saya coba lagi deh
Tq y..
Ok deh nanti saya coba lagi. thx y infonya
ok. sama-sama..
thank’s infonya sob
sukses selalu
mas gimana cara membuat kembang api yg hrs punya hosting sndri itu mas?? bgs sekali itu kembang api nya, saya pgn membuat kembang api yg serti itu, apa bisa di jlas kn??
mantap ne musti i tarok…. ayo liat juga ne sisilain internet,klik di http://www.kawankita.co.cc
apa
taroh ahhhh..
matur suwun gan
apa kode nya udah diparsing mas??
nanti kodenya taruh diatas baris
</body></html>