The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fireworks?

+4
Random
Raph95
BMX_DUDE
Rwar4war4wqq
8 posters

Go down

Fireworks? Empty Fireworks?

Post by Rwar4war4wqq 6/1/2008, 15:33

I want to add fireworks to my forum. How do you do that?
Rwar4war4wqq
Rwar4war4wqq
Forumember

Male Posts : 61
Reputation : 0
Language : English
Location : In my 1.08

http://mrsquishy.forumotion.co.uk/

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by BMX_DUDE 6/1/2008, 15:57

u need a script code
BMX_DUDE
BMX_DUDE
New Member

Posts : 18
Reputation : 0
Language : german

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Raph95 6/1/2008, 16:18

And does anybody have the script for this? I'll try to Google it out...
Raph95
Raph95
Forumember

Male Posts : 798
Reputation : 3
Language : English, Serban, Croatian, Bosinan :)
Location : Nis, Serbia

http://TMNT-Forum.com

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Random 6/1/2008, 16:30

That would be cool!
Random
Random
Forumember

Posts : 338
Reputation : 5
Language : English

http://www.FunChat.qforum.biz

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by nintendopals 6/1/2008, 17:11

if there is one its going to be cool like random said.
nintendopals
nintendopals
Forumember

Posts : 27
Reputation : 0
Language : english

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Raph95 6/1/2008, 18:25

No no no I can't Google any please someone make this one tomorrow is birthday to one of my members I wanna fireworks, ballons, anything, I want party!!!
Raph95
Raph95
Forumember

Male Posts : 798
Reputation : 3
Language : English, Serban, Croatian, Bosinan :)
Location : Nis, Serbia

http://TMNT-Forum.com

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by BMX_DUDE 6/1/2008, 18:41

BMX_DUDE
BMX_DUDE
New Member

Posts : 18
Reputation : 0
Language : german

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Blax 6/1/2008, 18:46

Katt wrote:You're having problems installing a cursor, you want to put an animated Flask banner, you want to link off your forum with an external CSS file...

Here's a little program created by my colleague SanDream to make your life easier.

Script Generator (click on the England flag to have the English menu)

Explanation topic : https://help.forumotion.com/viewtopic.forum?t=317


Forum Index Generator for your portal

Explanation topic : https://help.forumotion.com/viewtopic.forum?t=249

Katt

PS : If you enconter a bug, tell it there and then, I will transmit your message to SanDream. And please, try to be clear and easy to understand for French people who are not totally bilingual!
Blax
Blax
Forumember

Male Posts : 262
Reputation : 10
Language : English
Location : Australia

http://real.omgforum.net/

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Raph95 7/1/2008, 09:09

Please, anyone to make fireworks/baloons?
Raph95
Raph95
Forumember

Male Posts : 798
Reputation : 3
Language : English, Serban, Croatian, Bosinan :)
Location : Nis, Serbia

http://TMNT-Forum.com

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Tricky 7/1/2008, 18:01

I know someone with this code. It is possible. He will not give it to me though.
Tricky
Tricky
Forumember

Posts : 47
Reputation : 0
Language : English

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Rwar4war4wqq 12/1/2008, 18:35

I just want a code for fireworks.
Rwar4war4wqq
Rwar4war4wqq
Forumember

Male Posts : 61
Reputation : 0
Language : English
Location : In my 1.08

http://mrsquishy.forumotion.co.uk/

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by BMX_DUDE 13/1/2008, 03:56

Code:
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
// Autor (By Matt Gabbert, mgabbert@usrtoday.com, http://www.nolag.com)
// Dieses Script stammt von Klaus Hentschels Javapage
// e-mail: kh@javarea.de
// www: http://www.javarea.de
// Bitte entfernen sie diesen Vermerk nicht!

var intervals=2000
var sparksOn    = true;
var speed        = 40;
var power        = 3;
var documentWidth=documentHeight=randomx=randomy=leftcorner=topcorner=0
var ns=(document.layers);
var ie=(document.all);
var sparksAflyin = false;
var allDivs      = new Array(11);
var totalSparks  = 0;

function initAll(){
   if(!ns && !ie){
   sparksOn = false;
   return;
   }
setInterval("firework()",intervals)
if (ns)
   document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
   for(dNum=0; dNum<11; ++dNum){
      if(ie)
         allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style');
      else
         allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]');
   }
}
function firework(){

if (ie){
documentWidth=document.body.clientWidth
documentHeight=document.body.clientHeight
leftcorner=document.body.scrollLeft
topcorner=document.body.scrollTop
}
else if (ns){
documentWidth=window.innerWidth
documentHeight=window.innerHeight
leftcorner=pageXOffset
topcorner=pageYOffset
}
randomx=leftcorner+Math.floor(Math.random()*documentWidth)
randomy=topcorner+Math.floor(Math.random()*documentHeight)
   if(sparksOn){
      if(!sparksAflyin){
         sparksAflyin=true;
         totalSparks=0;
         for(var spark=0;spark<=10;spark++){
            dx=Math.round(Math.random()*50);
            dy=Math.round(Math.random()*50);
            moveTo(spark,randomx,randomy,dx,dy);
         }
      }
   }
}
function moveTo(i,tempx,tempy,dx,dy){
   if(ie){
      if(tempy+80>(document.body.offsetHeight+document.body.scrollTop))
         tempy=document.body.offsetHeight+document.body.scrollTop-80;
      if(tempx+80>(document.body.offsetWidth+document.body.scrollLeft))
         tempx=document.body.offsetWidth+document.body.scrollLeft-80;
   }
   if(tempx>-50&&tempy>-50){
      tempx+=dx;tempy+=dy;
      allDivs[i].left=tempx;
      allDivs[i].top=tempy;
      dx-=power;dy-=power;
      setTimeout("moveTo("+i+","+tempx+","+tempy+","+dx+","+dy+")",speed)
   }
   else
      ++totalSparks
   if(totalSparks==10){
      sparksAflyin=false;
      totalSparks=0;
   }
}
window.onload=initAll
// -->
</script>
<style>
#sDiv0 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:Aqua;}
#sDiv1 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:red;}
#sDiv2 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:blue;}
#sDiv3 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:orange;}
#sDiv4 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:yellow;}
#sDiv5 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:lightgreen;}
#sDiv6 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:silver;}
#sDiv7 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:gold;}
#sDiv8 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:white;}
#sDiv9 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:deepskyblue;}
#sDiv10 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:green;}
</style>


<div id="sDiv0">*</div>
<div id="sDiv1">*</div>
<div id="sDiv2">*</div>
<div id="sDiv3">*</div>
<div id="sDiv4">*</div>
<div id="sDiv5">*</div>
<div id="sDiv6">*</div>
<div id="sDiv7">*</div>
<div id="sDiv8">*</div>
<div id="sDiv9">*</div>
<div id="sDiv10">*</div>
BMX_DUDE
BMX_DUDE
New Member

Posts : 18
Reputation : 0
Language : german

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Raph95 13/1/2008, 04:03

It just shows a star near place where I have put the script Sad
Raph95
Raph95
Forumember

Male Posts : 798
Reputation : 3
Language : English, Serban, Croatian, Bosinan :)
Location : Nis, Serbia

http://TMNT-Forum.com

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by final fantasy 13/1/2008, 09:51

do you mean like this?FIREWORKS
final fantasy
final fantasy
Forumember

Male Posts : 49
Reputation : 0
Language : english/filipino/japanese
Location : japan

http://talkandlaugh.forumotion.com

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Tricky 14/1/2008, 15:22

Got it! I had to search through some HTML at a site but I found it! I just copied it and I have not had to time to see what it is like.

Oops, the code is to big to fit into the post...plus. I just tested it out. It freezes in places but that may just be me, who wants to try it? Post if you will test it and I will PM it to you...

Confused

Edit: Sorry if this sounds like bragging but, "I'm fast!" I have fixed the bug and the code! Very Happy Problem is, code is still big...finding a way of posting it...
:/

~Tricky
Tricky
Tricky
Forumember

Posts : 47
Reputation : 0
Language : English

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Tricky 14/1/2008, 19:01

Code:
<SCRIPT TYPE="text/javascript">

if(!window.fireworks) fireworks=new Object();

if(!fireworks.createLayer)
{

var ns4 = document.layers;
var ie4 = document.all;
fireworks.objNo=0;

fireworks.getObjId = function(){return "fireworks_obj" + fireworks.objNo++;};

fireworks.createLayer = function(theHtml)
{
   var layerId = fireworks.getObjId();

   document.write(ns4 ? "<LAYER  NAME='"+layerId+"'>"+theHtml+"</LAYER>" :
              "<DIV id='"+layerId+"' style='position:absolute'>"+theHtml+"</DIV>" );

   var el =    document.getElementById   ? document.getElementById(layerId) :
         document.all       ? document.all[layerId] :
                       document.layers[layerId];

   if(ns4)
      el.style=el;

   return el;
}
fireworks.fxLayer = function(theHtml)
{
   if(theHtml == null) return;
   this.el = fireworks.createLayer(theHtml);
}
var proto = fireworks.fxLayer.prototype

proto.moveTo    = function(x,y){this.el.style.left = x;this.el.style.top=y;}
proto.setBgColor = function(color) { this.el.style.backgroundColor = color; }
proto.clip      = function(x1,y1, x2,y2){ this.el.style.clip="rect("+y1+" "+x2+" "+y2+" "+x1+")"; }
if(ns4){
   proto.clip = function(x1,y1, x2,y2){
      this.el.style.clip.top    =y1;this.el.style.clip.left   =x1;
      this.el.style.clip.bottom=y2;this.el.style.clip.right   =x2;
   }
   proto.setBgColor=function(color) { this.el.bgColor = color; }
}
if(window.opera)
   proto.setBgColor = function(color) { this.el.style.color = color==null?'transparent':color; }

if(window.innerWidth)
{
   gX=function(){return innerWidth;};
   gY=function(){return innerHeight;};
}
else
{
   gX=function(){return document.body.clientWidth;};
   gY=function(){return document.body.clientHeight;};
}
fireworks.fxLayer2 = function(theHtml)
{
   this.superC = fireworks.fxLayer;
   this.superC(theHtml + "C");
}
fireworks.fxLayer2.prototype = new fireworks.fxLayer;
}
fireworks.Spark = function(x, y)
{
   this.superC = fireworks.fxLayer;
   this.superC("*");

   this.dx    = Math.random() * 4 - 2;
   this.dy   = Math.random() * 4 - 2;
   this.ay   = .09;
   this.x   = x;
   this.y   = y;
   this.type = 0;
}
fireworks.Spark.prototype = new fireworks.fxLayer;

fireworks.Spark.prototype.fire0 = function()
{
   var a = Math.random() * 6.294;
   var s = Math.random() * 2;
   if(Math.random() >.6) s = 2;
   this.dx = s*Math.sin(a);
   this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire1 = function()
{
   var a = Math.random() * 6.294;
   var s = Math.random() * 2;
   this.dx = s*Math.sin(a);
   this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire2 = function()
{
   var a = Math.random() * 6.294;
   var s = 2;
   this.dx = s*Math.sin(a);
   this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire3 = function()
{
   var a = Math.random() * 6.294;
   var s = a - Math.random();
   this.dx = s*Math.sin(a);
   this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire4 = function()
{
   var a = Math.random() * 6.294;
   var s = (Math.random() > 0.5) ? 2 : 1;
   if(s==1)this.setBgColor("#FFFFFF");
   s -= Math.random()/4;
   this.dx = s*Math.sin(a);
   this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire = function(sx, sy, fw, cl)
{
   this.setBgColor(cl);

   if(fw == 1)
      this.fire1();
   else if(fw == 2)
      this.fire2();
   else if(fw == 3)
      this.fire3();
   else if(fw == 4)
      this.fire4();
   else
      this.fire0();

   this.x   = sx;
   this.y   = sy;
   this.moveTo(sx, sy);
}
fireworks.Spark.prototype.animate = function(step)
{
   this.dy += this.ay;
   this.x += this.dx;
   this.y += this.dy;
   this.moveTo(this.x, this.y);
}
fireworks.Firework = function(numSparks)
{
   window[ this.id = fireworks.getObjId() ] = this;

   this.sparkle = new Array();
   for(i=0 ; i<numSparks; i++)
   {
      this.sparkle[i]=new fireworks.Spark(-10, -10);
      this.sparkle[i].clip(0,0,3,3);
      this.sparkle[i].setBgColor("#00FF00");
   }
   this.step = 0;
   this.timerId = -1;
   this.x = 0;
   this.y = 0;
   this.dx = 0;
   this.dy = 0;
   this.ay = 0.2;
   this.state = "Off";
}
fireworks.Firework.prototype.explode = function()
{
   var fw = Math.floor(Math.random() * 5);

   for(i=0 ; i<this.sparkle.length ; i++)
   {
      this.sparkle[i].fire(this.x, this.y, fw, this.color);
      this.sparkle[i].dx += this.dx;
      this.sparkle[i].dy += this.dy;
   }
}
fireworks.Firework.prototype.getMaxDy = function()
{
   var ydiff = gY() - 30;
   var dy    = 1;
   var dist  = 0;
   var ay    = this.ay;
   while(dist<ydiff)
   {
      dist += dy;
      dy+=ay;
   }
   return -dy;
}
fireworks.Firework.prototype.animate = function()
{
   if(this.state=="Off")
   {
      var colors = new Array("#color", "#color", "#color", "#color", "#color", "#color");
      this.color = colors[Math.floor(Math.random()*colors.length)];

      this.step = 0;
      this.x = gX()/2;
      this.y = gY()-10;
      this.dy = this.getMaxDy();
      this.dx = Math.random()*-8 + 4;
      this.dy += Math.random()*3;
      for(i=0 ; i<this.sparkle.length ; i++)
         this.sparkle[i].moveTo(-10,-10);
      this.sparkle[0].setBgColor(this.color);
      this.state = "Move";
   }
   else if(this.state=="Move")
   {
      this.x += this.dx;
      this.y += this.dy;
      this.dy += this.ay;
      this.sparkle[0].moveTo(this.x,this.y);
      if(this.dy > 1)
      {
         this.state="Bang"
         this.explode();
      }
   }
   else
   {
      if(this.step > 40)
         this.state="Off";

      this.step++;

      for(i=0 ; i<this.sparkle.length ; i++)
         this.sparkle[i].animate(this.step);
   }
}
fireworks.Firework.prototype.start = function()
{
   if(this.timerId == -1)
   {
      this.state = "Off";
      this.timerId = setInterval("window."+this.id+".animate()", 30);
   }
}
fireworks.Firework.prototype.stop = function()
{
   if(this.timerId != -1)
   {
      clearInterval(this.timerId);
      for(i=0 ; i<this.sparkle.length ; i++)
         this.sparkle[i].moveTo(-10,-10);
      this.timerId = -1;
      this.step = 0;
   }
}
fireworks.DisplayStart = function()
{
   if(fireworks.DisplayLoad)fireworks.DisplayLoad();
   Display1.start();
   Display2.start();
   Display3.start();
   Display4.start();
}
Display1 = new fireworks.Firework(30);
Display2 = new fireworks.Firework(30);
Display3 = new fireworks.Firework(30);
Display4 = new fireworks.Firework(30);
fireworks.DisplayLoad=window.onload;
window.onload=fireworks.DisplayStart;
// -->
</SCRIPT>

There it is, sorry for dp but it would not fit.
Tricky
Tricky
Forumember

Posts : 47
Reputation : 0
Language : English

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Random 14/1/2008, 19:26

Can I see an example of it? ( I dont want to erase m current code if I dont like this one lol )
Random
Random
Forumember

Posts : 338
Reputation : 5
Language : English

http://www.FunChat.qforum.biz

Back to top Go down

Fireworks? Empty Re: Fireworks?

Post by Tricky 15/1/2008, 15:57

OK, I have to explain or else it will not work, I promise you.

First, I would like you to find this part in the code:

Code:
fireworks.Firework.prototype.animate = function()
{
  if(this.state=="Off")
  {
      var colors = new Array("#color", "#color", "#color", "#color", "#color", "#color");
      this.color = colors[Math.floor(Math.random()*colors.length)];

      this.step = 0;

As you see we do not have color codes, we have "#color". Now, this is very easy but just to make it easier, look at this:

var colors = new Array
("#color", "#color", "#color", "#color", "#color", "#color");

Everything in the bold needs to be changed to an HTML color code. A HTML color code looks like this:

#FFFFFF

Red- Always stays
Blue- Switch around for colors

It is 6 digits, numbers or letters, to make up a code. Here is the 2 common codes,

#FFFFFF - White
#00000 - Black

As for the other thousands of colors, Google "HTML color codes" to find what you are looking for. If you want a certain color that you see on a site or somewhere, tell me, I can get it for you.


Edit, for post above me:
Sorry about that, started typing this yesterday and left it up. As for an example, uh, just make a new HTML page.

Admin CP Arrow Modules Arrow HTML Page Arrow Create new HTML page

Input the code and then scroll down and press preview, not save. It will bring up a preview for you and if you don't like it, don't add it. Also remember to do what I have above this edit, about the color codes.
~Tricky
Tricky
Tricky
Forumember

Posts : 47
Reputation : 0
Language : English

Back to top Go down

Back to top


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