The forum of the forums
Welcome on the Forumotion Support Forum.

To take full advantage of everything offered by our forum, please log in if you are already a member or join our community if you're not yet....



Create a free forum like this one.
Set of decorations for Halloween552

Set of decorations for Halloween

View previous topic View next topic Go down

Set of decorations for Halloween

Post by Buttercup on October 23rd 2012, 1:54 pm

Set of decorations for Halloween


Hello everyone Hello

Here's a set of animations and decorations to make your forum more scary for Halloween.



  • Rain of bats (To add in the Admin Panel > Display > Homepage > Generalities > Homepage message) :




Code:
<script type="text/javascript">
var speed=40; // Speed
var flakes=20; // Number of bats
var flake_image="http://i47.servimg.com/u/f47/15/17/71/53/vamp10.png"; //url of the image
var swide, shigh;
var dx=new Array();
var xp=new Array();
var yp=new Array();
var am=new Array();
var sty=new Array();
window.onload=function() { if (document.getElementById) {
var k, f, b;
b=document.createElement("div");
b.style.position="absolute";
b.setAttribute("id", "bod");
document.body.appendChild(b);
set_scroll();
set_width();
for (var i=0; i<flakes; i++) {
dx[i]=0;
am[i]=Math.random()*20;
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=Math.random()*shigh;
sty[i]=0.75+1.25*Math.random();
f=document.createElement("div");
f.style.position="absolute";
f.setAttribute("id", "flk"+i);
f.style.zIndex=i;
f.style.top=yp[i]+"px";
f.style.left=xp[i]+"px";
k=document.createElement("img");
k.src=flake_image;
f.appendChild(k);
b.appendChild(f);
}
setInterval("winter_snow()", speed);
}}
window.onresize=set_width;
function set_width() {
if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (typeof(self.innerHeight)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
else {
swide=800;
shigh=600
}
}
window.onscroll=set_scroll;
function set_scroll() {
var sleft, sdown;
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
document.getElementById("bod").style.top=sdown+"px";
document.getElementById("bod").style.left=sleft+"px";
}
function winter_snow() {
for (var i=0; i<flakes; i++) {
yp[i]+=sty[i];
if (yp[i]>shigh-30) {
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=0;
sty[i]=0.75+1.25*Math.random();
}
dx[i]+=0.02+Math.random()/10;
document.getElementById("flk"+i).style.top=yp[i]+"px";
document.getElementById("flk"+i).style.left=(xp[i]+am[i]*Math.sin(dx[i]))+"px";
}
}
</script>


  • You can change the image , the speed and the number of image changes.

    Code:
    var speed=cifra; // Speed
    var flakes=cifra; // Number of bats
    var flake_image // url of the image

  • Here are some examples of Halloween images



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/cheshi10.png



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/geek_z10.png



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/ninja_10.png



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/pumpki11.png



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/scream10.png



    Code:
    http://i45.servimg.com/u/f45/16/95/56/96/witch_10.png


  • Rain of ghosts (Add the code in the Admin Panel > General > forum > Configuration) :




Code:
<script languaje=JavaScript src=http://jqueryb.googlecode.com/files/ghost-fxV1.0.js></script>




And don't forget, you can add one of our Halloween theme on your forum through
Hitskin







Or create your own and upload it on Hitskin !


Happy Halloween to all on Forumotion


Translated and updated by the Forumotion Staff

Tutorial created by : Celina - 14.10.11, from the Spanish Support Forum
CopyrightŠ FORUMOTION.COM

Buttercup
Administrator
Administrator

Female
Posts: 9402
Language: French, English
Points: 9426
Join date: 2007-09-04

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum