click semua kat sini

Followers

Tuesday, February 21, 2012

Tutorial : Buat fireworks di blog .

Views


salam .
hari ni lya nak ajar cara buat percitan bunga api iaitu orang mak saleh panggil fireworks .
ehe 
contohnye kat bawah ni .








ikut step ni .
dashboard > design > add gadget > html java script


copy dan paste kod bawah ni

<script>if(typeof $pdj=='undefined'){document.write('<'+'script');document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">');document.write('</'+'script'+'>')}</script><script>if(typeof $pdj=='undefined'){var $pdj=jQuery.noConflict()}var sparkel=false;var sparkelCount=0;var fireworksTimer=Array();if(!image_urls){var image_urls=Array()}if(!flash_urls){var flash_urls=Array()}flash_urls['fireworks']="http://megaswf.com/file/77216/";$pdj(document).ready(function(){$pdj('<div></div>').css({position:'absolute',height:'100px',width:'100px','z-index':'50','display':'none'}).attr('id','firework1').appendTo('body');$pdj('#firework1').flash({swf:flash_urls['fireworks'],width:'100%',height:'100%',scale:"scale",wmode:"transparent",quality:"high",allowFullScreen:false,allowScriptAccess:'sameDomain'});$pdj('<div></div>').css({position:'absolute',height:'100px',width:'100px','z-index':'49','display':'none'}).attr('id','firework2').appendTo('body');$pdj('#firework2').flash({swf:flash_urls['fireworks'],width:'100%',height:'100%',scale:"scale",wmode:"transparent",quality:"high",allowFullScreen:false,allowScriptAccess:'sameDomain'});var a=function(){sparkel=true;fireWorks_left('firework1');fireWorks_right('firework2');setTimeout(function(){sparkel==false;clearTimeout(fireworksTimer['firework1']);clearTimeout(fireworksTimer['firework2']);$pdj('#firework1').hide();$pdj('#firework2').hide();setTimeout(function(){a()},5000)},10000)};setTimeout(function(){a()},2000)});function IsNumeric(n){return!isNaN(n)}function randomNum(a,b){var c=(parseFloat(b)-parseFloat(a))+1;var d=Math.floor(Math.random()*c)+parseFloat(a);return d}function fireWorks_left(a){var b=randomNum(50,400);var c=randomNum(50,200);var d=randomNum(100,400);$pdj('#'+a).css({left:c,top:b,height:d+'px',width:d+'px',display:'block'});if(sparkel==true){fireworksTimer[a]=setTimeout('fireWorks_right("'+a+'")',randomNum(800,1000))}}function fireWorks_right(a){var b=randomNum(50,400);var c=randomNum(50,200);var d=randomNum(100,400);$pdj('#'+a).css({right:c,top:b,height:d+'px',width:d+'px',display:'block'});if(sparkel==true){fireworksTimer[a]=setTimeout('fireWorks_right("'+a+'")',randomNum(800,1000))}}if(!$pdj().flash){(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})($pdj,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject)}</script><script>if(typeof $pdj=='undefined'){document.write('<'+'script');document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">');document.write('</'+'script'+'>')}</script><script>if(typeof $pdj=='undefined'){var $pdj=jQuery.noConflict()}$pdj(document).ready(function(){var a=$pdj('<img>').attr({'src':'http://img600.imageshack.us/img600/2662/tagcopy.png','border':0});$pdj('<a></a>').css({position:'absolute',right:'0px',top:'22px','z-index':'90'}).attr({'href':'http://blogamation.com/'}).append(a).appendTo('body')});</script>
save dulu dan preview !
jangan lupe kasi tahu lya
n dun copy my tuto .if nak copy kredit to LYA MARC JACOB .
Sekian .





THANKS BACA ENTRY LYA . .LIKE JIKA SUKA

0 comments: