Como colocar fogos de artificio no fórum?

5 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Como colocar fogos de artificio no fórum?

Mensagem por Bruninho._ 26.12.12 0:14

Qual é minha questão:
Achei esse script e queria saber como coloco ele no meu forum.

http://www.javascript-fx.com/submitscripts/fireworks/fireworksImagePage/fw08.html

Endereço do meu fórum:
http://csispecialagents.forumeiros.com

Versão do fórum:
PHPBB3


Última edição por Bruninho._ em 27.12.12 17:15, editado 1 vez(es)
Bruninho._

Bruninho._
***

Membro desde : 18/07/2012
Mensagens : 146
Pontos : 229

http://www.nwdgames.com https://www.facebook.com/nwdgames https://twitter.com/nwd_

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Gabyte 26.12.12 0:31

Você precisa pegar o Codigo dele e criar uma nova Pagina JavaScript e colocar o codigo lá.

Painel de Controle Como colocar fogos de artificio no fórum? Puce_bleu Módulos Como colocar fogos de artificio no fórum? Puce_bleu Gestão dos Codigos JavaScript Como colocar fogos de artificio no fórum? Puce_bleu Criar um novo JavaScript


Cordialmente.
Gabyte
Gabyte

Gabyte
**

Membro desde : 04/01/2012
Mensagens : 57
Pontos : 111

http://slyce-design.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Bruninho._ 27.12.12 1:52

Sim eu quero saber o código para colocar
Bruninho._

Bruninho._
***

Membro desde : 18/07/2012
Mensagens : 146
Pontos : 229

http://www.nwdgames.com https://www.facebook.com/nwdgames https://twitter.com/nwd_

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Sapinho 27.12.12 2:31

queira ler este tópico https://ajuda.forumeiros.com/t72353-como-colocar-efeito-de-fogos-de-artificio-no-forum#494477

um dos dois códigos poderão lhe ser util
Sapinho

Sapinho
Super Membro

Membro desde : 13/02/2010
Mensagens : 1043
Pontos : 1423

http://forum.academianinjakonoha.com/ https://www.facebook.com/brubsg10

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Bruninho._ 27.12.12 15:58

Não deu certo =/

Tem algum em Widget ?
Bruninho._

Bruninho._
***

Membro desde : 18/07/2012
Mensagens : 146
Pontos : 229

http://www.nwdgames.com https://www.facebook.com/nwdgames https://twitter.com/nwd_

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Holmes 27.12.12 16:59

Saudações,

Os Widgets do seu fórum não estão ativos.

Coloque esse Javascript em um Widget:
Código:
<script>/**
  * You may use this code for free on any web page provided that
  * these comment lines and the following credit remain in the code.
  * Cross Browser Fireworks from http://www.javascript-fx.com
  */
/*************************************************/
if(!window.JSFX) JSFX=new Object();

if(!JSFX.createLayer)
{/*** Include Library Code ***/

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

JSFX.getObjId = function(){return "JSFX_obj" + JSFX.objNo++;};

JSFX.createLayer = function(theHtml)
{
   var layerId = JSFX.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;
}
JSFX.fxLayer = function(theHtml)
{
   if(theHtml == null) return;
   this.el = JSFX.createLayer(theHtml);
}
var proto = JSFX.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;};
}

/*** Example extend class ***/
JSFX.fxLayer2 = function(theHtml)
{
   this.superC = JSFX.fxLayer;
   this.superC(theHtml + "C");
}
JSFX.fxLayer2.prototype = new JSFX.fxLayer;
}/*** End Library Code ***/

/*************************************************/

/*** Class Firework extends FxLayer ***/
JSFX.Firework = function(fwImages)
{
   window[ this.id = JSFX.getObjId() ] = this;
   this.imgId = "i" + this.id;
   this.fwImages  = fwImages;
   this.numImages = fwImages.length;
   this.superC = JSFX.fxLayer;
   this.superC("<img src='"+fwImages[0].src+"' name='"+this.imgId+"'>");

   this.img = document.layers ? this.el.document.images[0] : document.images[this.imgId];
   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";
}
JSFX.Firework.prototype = new JSFX.fxLayer;

JSFX.Firework.prototype.getMaxDy = function()
{
   var ydiff = gY() - 130;
   var dy    = 1;
   var dist  = 0;
   var ay    = this.ay;
   while(dist<ydiff)
   {
      dist += dy;
      dy+=ay;
   }
   return -dy;
}
JSFX.Firework.prototype.setFrame = function()
{
//   this.img.src=this.fwName+"/"+this.step+".gif";
   this.img.src=this.fwImages[ this.step ].src;
}
JSFX.Firework.prototype.animate = function()
{

   if(this.state=="OFF")
   {
      
      this.step = 0;
      this.x = -200;
      this.y = -200;
      this.moveTo(this.x, this.y);
      this.setFrame();
      if(Math.random() > .95)
      {
         this.x = (gX()-200)*Math.random();
         this.y = (gY()-200)*Math.random();
         this.moveTo(this.x, this.y);
         this.state = "EXPLODE";
      }
   }
   else if(this.state == "EXPLODE")
   {
      this.step++;
      if(this.step < this.numImages)
         this.setFrame();
      else
         this.state="OFF";
   }
}
/*** END Class Firework***/

/*** Class FireworkDisplay extends Object ***/
JSFX.FireworkDisplay = function(n, fwImages, numImages)
{
   window[ this.id = JSFX.getObjId() ] = this;
   this.timerId = -1;
   this.fireworks = new Array();
   this.imgArray = new Array();
   this.loadCount=0;
   this.loadImages(fwImages, numImages);

   for(var i=0 ; i<n ; i++)
      this.fireworks[this.fireworks.length] = new JSFX.Firework(this.imgArray);
}
JSFX.FireworkDisplay.prototype.loadImages = function(fwName, numImages)
{
   for(var i=0 ; i<numImages ; i++)
   {
      this.imgArray[i] = new Image();
      this.imgArray[i].obj = this;
      this.imgArray[i].onload = window[this.id].imageLoaded;
      this.imgArray[i].src = fwName+"/"+i+".gif";
   }
}
JSFX.FireworkDisplay.prototype.imageLoaded = function()
{
   this.obj.loadCount++;
}

JSFX.FireworkDisplay.prototype.animate = function()
{
status = this.loadCount;
   if(this.loadCount < this.imgArray.length)
      return;

   for(var i=0 ; i<this.fireworks.length ; i++)
      this.fireworks[i].animate();
}
JSFX.FireworkDisplay.prototype.start = function()
{
   if(this.timerId == -1)
   {
      this.state = "OFF";
      this.timerId = setInterval("window."+this.id+".animate()", 40);
   }

}
JSFX.FireworkDisplay.prototype.stop = function()
{
   if(this.timerId != -1)
   {
      clearInterval(this.timerId);
      this.timerId = -1;
      for(var i=0 ; i<this.fireworks.length ; i++)
      {
         this.fireworks[i].moveTo(-100, -100);
         this.fireworks[i].step = 0;;
         this.fireworks[i].state = "OFF";
      }   
   }
}
/*** END Class FireworkDisplay***/

JSFX.FWStart = function()
{
   if(JSFX.FWLoad)JSFX.FWLoad();
   myFW.start();
}
myFW = new JSFX.FireworkDisplay(20, "fw08", 27);
JSFX.FWLoad=window.onload;
window.onload=JSFX.FWStart;</script>

Assombrosamente.
Holmes

Holmes
****

Membro desde : 11/11/2012
Mensagens : 303
Pontos : 413

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Bruninho._ 27.12.12 17:04

Vlw parcerio agora deu certo =D

Tem como mudar os fogos por estes?
http://www.javascript-fx.com/submitscripts/fireworks/fireworksImagePage/fw08.html
Bruninho._

Bruninho._
***

Membro desde : 18/07/2012
Mensagens : 146
Pontos : 229

http://www.nwdgames.com https://www.facebook.com/nwdgames https://twitter.com/nwd_

Ir para o topo Ir para baixo

Membro Entusiasta

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por BrunoH. 27.12.12 17:07

Olá!
Substitua o código por este:
Código:
<SCRIPT TYPE="text/javascript">
/**
  * You may use this code for free on any web page provided that
  * these comment lines and the following credit remain in the code.
  * Cross Browser Fireworks from http://www.javascript-fx.com
  */
/*************************************************/
if(!window.JSFX) JSFX=new Object();

if(!JSFX.createLayer)
{/*** Include Library Code ***/

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

JSFX.getObjId = function(){return "JSFX_obj" + JSFX.objNo++;};

JSFX.createLayer = function(theHtml)
{
   var layerId = JSFX.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;
}
JSFX.fxLayer = function(theHtml)
{
   if(theHtml == null) return;
   this.el = JSFX.createLayer(theHtml);
}
var proto = JSFX.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;};
}

/*** Example extend class ***/
JSFX.fxLayer2 = function(theHtml)
{
   this.superC = JSFX.fxLayer;
   this.superC(theHtml + "C");
}
JSFX.fxLayer2.prototype = new JSFX.fxLayer;
}/*** End Library Code ***/

/*************************************************/

/*** Class Firework extends FxLayer ***/
JSFX.Firework = function(fwImages)
{
   window[ this.id = JSFX.getObjId() ] = this;
   this.imgId = "i" + this.id;
   this.fwImages  = fwImages;
   this.numImages = fwImages.length;
   this.superC = JSFX.fxLayer;
   this.superC("<img src='"+fwImages[0].src+"' name='"+this.imgId+"'>");

   this.img = document.layers ? this.el.document.images[0] : document.images[this.imgId];
   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";
}
JSFX.Firework.prototype = new JSFX.fxLayer;

JSFX.Firework.prototype.getMaxDy = function()
{
   var ydiff = gY() - 130;
   var dy    = 1;
   var dist  = 0;
   var ay    = this.ay;
   while(dist<ydiff)
   {
      dist += dy;
      dy+=ay;
   }
   return -dy;
}
JSFX.Firework.prototype.setFrame = function()
{
//   this.img.src=this.fwName+"/"+this.step+".gif";
   this.img.src=this.fwImages[ this.step ].src;
}
JSFX.Firework.prototype.animate = function()
{

   if(this.state=="OFF")
   {
      
      this.step = 0;
      this.x = -200;
      this.y = -200;
      this.moveTo(this.x, this.y);
      this.setFrame();
      if(Math.random() > .95)
      {
         this.x = (gX()-200)*Math.random();
         this.y = (gY()-200)*Math.random();
         this.moveTo(this.x, this.y);
         this.state = "EXPLODE";
      }
   }
   else if(this.state == "EXPLODE")
   {
      this.step++;
      if(this.step < this.numImages)
         this.setFrame();
      else
         this.state="OFF";
   }
}
/*** END Class Firework***/

/*** Class FireworkDisplay extends Object ***/
JSFX.FireworkDisplay = function(n, fwImages, numImages)
{
   window[ this.id = JSFX.getObjId() ] = this;
   this.timerId = -1;
   this.fireworks = new Array();
   this.imgArray = new Array();
   this.loadCount=0;
   this.loadImages(fwImages, numImages);

   for(var i=0 ; i<n ; i++)
      this.fireworks[this.fireworks.length] = new JSFX.Firework(this.imgArray);
}
JSFX.FireworkDisplay.prototype.loadImages = function(fwName, numImages)
{
   for(var i=0 ; i<numImages ; i++)
   {
      this.imgArray[i] = new Image();
      this.imgArray[i].obj = this;
      this.imgArray[i].onload = window[this.id].imageLoaded;
      this.imgArray[i].src = fwName+"/"+i+".gif";
   }
}
JSFX.FireworkDisplay.prototype.imageLoaded = function()
{
   this.obj.loadCount++;
}

JSFX.FireworkDisplay.prototype.animate = function()
{
status = this.loadCount;
   if(this.loadCount < this.imgArray.length)
      return;

   for(var i=0 ; i<this.fireworks.length ; i++)
      this.fireworks[i].animate();
}
JSFX.FireworkDisplay.prototype.start = function()
{
   if(this.timerId == -1)
   {
      this.state = "OFF";
      this.timerId = setInterval("window."+this.id+".animate()", 40);
   }

}
JSFX.FireworkDisplay.prototype.stop = function()
{
   if(this.timerId != -1)
   {
      clearInterval(this.timerId);
      this.timerId = -1;
      for(var i=0 ; i<this.fireworks.length ; i++)
      {
         this.fireworks[i].moveTo(-100, -100);
         this.fireworks[i].step = 0;;
         this.fireworks[i].state = "OFF";
      }   
   }
}
/*** END Class FireworkDisplay***/

JSFX.FWStart = function()
{
   if(JSFX.FWLoad)JSFX.FWLoad();
   myFW.start();
}
myFW = new JSFX.FireworkDisplay(20, "fw08", 27);
JSFX.FWLoad=window.onload;
window.onload=JSFX.FWStart;

</SCRIPT>

Até mais.
BrunoH.

BrunoH.
Membro Entusiasta
Membro Entusiasta

Membro desde : 15/06/2012
Mensagens : 7675
Pontos : 10385

http://premiumdesign3d.blogspot.com.br/ https://www.facebook.com/brunohenrique.com.br

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Holmes 27.12.12 17:08

Bruninho._ escreveu:Vlw parcerio agora deu certo =D

Tem como mudar os fogos por estes?
http://www.javascript-fx.com/submitscripts/fireworks/fireworksImagePage/fw08.html
Eu passei os fogos dessa página, você colocou o código errado.

Até mais.
Holmes

Holmes
****

Membro desde : 11/11/2012
Mensagens : 303
Pontos : 413

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar fogos de artificio no fórum?

Mensagem por Bruninho._ 27.12.12 17:14

Nossa pq ficou diferente =/
mas de boa vlw pela ajuda =D
Bruninho._

Bruninho._
***

Membro desde : 18/07/2012
Mensagens : 146
Pontos : 229

http://www.nwdgames.com https://www.facebook.com/nwdgames https://twitter.com/nwd_

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

Permissões neste sub-fórum
Não podes responder a tópicos