WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Translate this code Empty Translate this code Sat Mar 06, 2010 6:56 pm

Macky

Macky
Registered Member
Registered Member
I need this ballon code translated to Fit into my site description.
Code:
<!--Copy and paste into your HTML just above the close </BODY> tag. -->

<script language="JavaScript1.2">
<!-- Begin
/*
Float Up Drifter - JavaScript
Visit www.rainbow.arch.scriptmania.com/scripts/index.html
  for this script and many more
*/
    // Configure below - change number of images to render
var no = 8;
    // Configure speed below
var speed = 20;  // The smaller the number, the faster the movement

var floatr = new Array();
  //  Your image location
floatr[0] = "balloon0.gif"
floatr[1] = "balloon1.gif"
floatr[2] = "balloon2.gif"
floatr[3] = "balloon3.gif"
floatr[4] = "balloon4.gif"
floatr[5] = "balloon5.gif"
floatr[6] = "balloon6.gif"
floatr[7] = "balloon7.gif"


var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;

if (ns4up||ns6up) {
        doc_width = self.innerWidth;
        doc_height = self.innerHeight;
} else if (ie4up) {
        doc_width = document.body.clientWidth;
        doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;

for (i = 0; i < no; ++ i) {
        dx[i] = 0;                        // set coordinate variables
        xp[i] = Math.random()*(doc_width-50);  // set position variables
        yp[i] = Math.random()*doc_height;
        am[i] = Math.random()*20;        // set amplitude variables
        stx[i] = 0.02 + Math.random()/10; // set step variables
        sty[i] = 0.7 + Math.random();    // set step variables
        if (ns4up) {                      // set layers
                if (i == 0) {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                } else {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                }        } else if (ie4up||ns6up) {                if (i == 0)
{
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                } else {
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                }
        }
        if (j == (floatr.length-1)) { j = 0; } else { j += 1; }
}

function floatrNS() {  // Netscape main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = self.innerWidth;
                        doc_height = self.innerHeight;                }
                dx[i] += stx[i];
                document.layers["dot"+i].top = yp[i]+pageYOffset;
                document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
        }
        setTimeout("floatrNS()", speed);
}

function floatrIE_NS6() {  // IE main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];
                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
                        doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
                }
                dx[i] += stx[i];
                if (ie4up){
                document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
                document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
                }
                else if (ns6up){
                document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
                document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
                }
        }
        setTimeout("floatrIE_NS6()", speed);
}

if (ns4up) {
        floatrNS();
} else if (ie4up||ns6up) {
        floatrIE_NS6();
}
// End -->
</script>
<p><font face="arial" size="-2">Free JavaScript from </font><br><font face="arial, helvetica" size="-2"><a href="http://rainbow.arch.scriptmania.com/scripts/">Rainbow Arch</a></font></p>

2Translate this code Empty Re: Translate this code Sat Mar 06, 2010 7:55 pm

Kratos

Kratos
Registered Member
Registered Member
what do u mean by translate??

3Translate this code Empty Re: Translate this code Sat Mar 06, 2010 8:21 pm

Macky

Macky
Registered Member
Registered Member
Black Cat XIII wrote:what do u mean by translate??

well i want the code to fit into my site description.

4Translate this code Empty Re: Translate this code Sat Mar 06, 2010 8:48 pm

ankillien

ankillien
Administrator
Administrator
Hi bear,

Forumotion's site description field can contain very limited amount of letter so I don't think you can put it in the site description.

However, you can put it in your templates and make it work.

5Translate this code Empty Re: Translate this code Sat Mar 06, 2010 9:13 pm

Macky

Macky
Registered Member
Registered Member
ankillien wrote:Hi bear,

Forumotion's site description field can contain very limited amount of letter so I don't think you can put it in the site description.

However, you can put it in your templates and make it work.

Hi Anki Smile
Ok how do i do that?

6Translate this code Empty Re: Translate this code Sat Mar 06, 2010 9:28 pm

ankillien

ankillien
Administrator
Administrator
Go to the index_body template and paste the code after the {JAVASCRIPT} part.

7Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:24 pm

Macky

Macky
Registered Member
Registered Member
ankillien wrote:Go to the index_body template and paste the code after the {JAVASCRIPT} part.

did that nothing happened

8Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:25 pm

ankillien

ankillien
Administrator
Administrator
Can you tell me what is that code for and what does it do?
You should read to documentation of the code on the providers website.

9Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:30 pm

Macky

Macky
Registered Member
Registered Member
it's supposed to be like this :

http://www.rainbow.arch.scriptmania.com/scripts/bg/float_up.html

10Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:34 pm

ankillien

ankillien
Administrator
Administrator
You have to upload those balloon images to your host and link them to this part of the code...

Code:
floatr[0] = "balloon0.gif"
floatr[1] = "balloon1.gif"
floatr[2] = "balloon2.gif"
floatr[3] = "balloon3.gif"
floatr[4] = "balloon4.gif"
floatr[5] = "balloon5.gif"
floatr[6] = "balloon6.gif"
floatr[7] = "balloon7.gif"

11Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:36 pm

Macky

Macky
Registered Member
Registered Member
ankillien wrote:You have to upload those balloon images to your host and link them to this part of the code...

Code:
floatr[0] = "balloon0.gif"
floatr[1] = "balloon1.gif"
floatr[2] = "balloon2.gif"
floatr[3] = "balloon3.gif"
floatr[4] = "balloon4.gif"
floatr[5] = "balloon5.gif"
floatr[6] = "balloon6.gif"
floatr[7] = "balloon7.gif"

oh i see thanks hold on i'll try.

12Translate this code Empty Re: Translate this code Sat Mar 06, 2010 11:46 pm

Macky

Macky
Registered Member
Registered Member
It never worked it came up a big code on my forum

http://www.bearvilleworld.com/index.htm

13Translate this code Empty Re: Translate this code Sun Mar 07, 2010 4:31 am

MrMega

MrMega
Registered Member
Registered Member
OK, wherever you have the code, replace that with this:

Code:

<script language="JavaScript1.2">
<!-- Begin
/*
Float Up Drifter - JavaScript
Visit www.rainbow.arch.scriptmania.com/scripts/index.html
  for this script and many more
*/
    // Configure below - change number of images to render
var no = 8;
    // Configure speed below
var speed = 20;  // The smaller the number, the faster the movement

var floatr = new Array();
  //  Your image location
floatr[0] = "http://i50.tinypic.com/s1u7v8.jpg"
floatr[1] = "http://i47.tinypic.com/21e4189.jpg"
floatr[2] = "http://i46.tinypic.com/2i06b9g.jpg"
floatr[3] = "http://i46.tinypic.com/ej9zli.gif"
floatr[4] = "http://i48.tinypic.com/2vayyaf.jpg"
floatr[5] = "http://i47.tinypic.com/2ldzzv8.jpg"
floatr[6] = "http://i49.tinypic.com/30wa7pk.jpg"
floatr[7] = "http://i48.tinypic.com/2wfsl54.jpg"


var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;

if (ns4up||ns6up) {
        doc_width = self.innerWidth;
        doc_height = self.innerHeight;
} else if (ie4up) {
        doc_width = document.body.clientWidth;
        doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;

for (i = 0; i < no; ++ i) {
        dx[i] = 0;                        // set coordinate variables
        xp[i] = Math.random()*(doc_width-50);  // set position variables
        yp[i] = Math.random()*doc_height;
        am[i] = Math.random()*20;        // set amplitude variables
        stx[i] = 0.02 + Math.random()/10; // set step variables
        sty[i] = 0.7 + Math.random();    // set step variables
        if (ns4up) {                      // set layers
                if (i == 0) {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                } else {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                }        } else if (ie4up||ns6up) {                if (i == 0)
{
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                } else {
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                }
        }
        if (j == (floatr.length-1)) { j = 0; } else { j += 1; }
}

function floatrNS() {  // Netscape main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = self.innerWidth;
                        doc_height = self.innerHeight;                }
                dx[i] += stx[i];
                document.layers["dot"+i].top = yp[i]+pageYOffset;
                document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
        }
        setTimeout("floatrNS()", speed);
}

function floatrIE_NS6() {  // IE main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];
                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
                        doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
                }
                dx[i] += stx[i];
                if (ie4up){
                document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
                document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
                }
                else if (ns6up){
                document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
                document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
                }
        }
        setTimeout("floatrIE_NS6()", speed);
}

if (ns4up) {
        floatrNS();
} else if (ie4up||ns6up) {
        floatrIE_NS6();
}
// End -->
</script>
<p><font face="arial" size="-2">Free JavaScript fromĀ </font><br><font face="arial, helvetica" size="-2"><a href="http://rainbow.arch.scriptmania.com/scripts/">Rainbow Arch</a></font></p>

It should work now. Smile

14Translate this code Empty Re: Translate this code Sun Mar 07, 2010 4:34 am

Macky

Macky
Registered Member
Registered Member
MrMega wrote:OK, wherever you have the code, replace that with this:

Code:

<script language="JavaScript1.2">
<!-- Begin
/*
Float Up Drifter - JavaScript
Visit www.rainbow.arch.scriptmania.com/scripts/index.html
  for this script and many more
*/
    // Configure below - change number of images to render
var no = 8;
    // Configure speed below
var speed = 20;  // The smaller the number, the faster the movement

var floatr = new Array();
  //  Your image location
floatr[0] = "http://i50.tinypic.com/s1u7v8.jpg"
floatr[1] = "http://i47.tinypic.com/21e4189.jpg"
floatr[2] = "http://i46.tinypic.com/2i06b9g.jpg"
floatr[3] = "http://i46.tinypic.com/ej9zli.gif"
floatr[4] = "http://i48.tinypic.com/2vayyaf.jpg"
floatr[5] = "http://i47.tinypic.com/2ldzzv8.jpg"
floatr[6] = "http://i49.tinypic.com/30wa7pk.jpg"
floatr[7] = "http://i48.tinypic.com/2wfsl54.jpg"


var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;

if (ns4up||ns6up) {
        doc_width = self.innerWidth;
        doc_height = self.innerHeight;
} else if (ie4up) {
        doc_width = document.body.clientWidth;
        doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;

for (i = 0; i < no; ++ i) {
        dx[i] = 0;                        // set coordinate variables
        xp[i] = Math.random()*(doc_width-50);  // set position variables
        yp[i] = Math.random()*doc_height;
        am[i] = Math.random()*20;        // set amplitude variables
        stx[i] = 0.02 + Math.random()/10; // set step variables
        sty[i] = 0.7 + Math.random();    // set step variables
        if (ns4up) {                      // set layers
                if (i == 0) {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                } else {
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src=\""+ floatr[j] + "\" border=\"0\"></layer>");
                }        } else if (ie4up||ns6up) {                if (i == 0)
{
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                } else {
                        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" + floatr[j] + "\" border=\"0\"></div>");
                }
        }
        if (j == (floatr.length-1)) { j = 0; } else { j += 1; }
}

function floatrNS() {  // Netscape main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = self.innerWidth;
                        doc_height = self.innerHeight;                }
                dx[i] += stx[i];
                document.layers["dot"+i].top = yp[i]+pageYOffset;
                document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
        }
        setTimeout("floatrNS()", speed);
}

function floatrIE_NS6() {  // IE main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= sty[i];
                if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
                        doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
                }
                dx[i] += stx[i];
                if (ie4up){
                document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
                document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
                }
                else if (ns6up){
                document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
                document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
                }
        }
        setTimeout("floatrIE_NS6()", speed);
}

if (ns4up) {
        floatrNS();
} else if (ie4up||ns6up) {
        floatrIE_NS6();
}
// End -->
</script>
<p><font face="arial" size="-2">Free JavaScript fromĀ </font><br><font face="arial, helvetica" size="-2"><a href="http://rainbow.arch.scriptmania.com/scripts/">Rainbow Arch</a></font></p>

It should work now. Smile

ok did it no balloons are coming up Sad

15Translate this code Empty Re: Translate this code Sun Mar 07, 2010 5:30 am

MrMega

MrMega
Registered Member
Registered Member
Really? It works fine on my forum.

Maybe use this:

http://www.ego-one.com/tricks-and-tuts-f18/not-enough-room-in-the-site-description-for-all-your-code-no-problem-t576.htm

16Translate this code Empty Re: Translate this code Sun Mar 07, 2010 9:17 pm

Macky

Macky
Registered Member
Registered Member
Never worked ; don't need it now, Thanks you may lock this now.

17Translate this code Empty Re: Translate this code Mon Mar 08, 2010 2:10 am

Kratos

Kratos
Registered Member
Registered Member
solved |locked

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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