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.

can I make scrolling announcements change colour.

4 posters

Go down

can I make scrolling announcements change colour.  Empty can I make scrolling announcements change colour.

Post by Flappypaddles 27/12/2011, 20:13



I know how to change the colour of the whole announcement or individual words but I would like the announcement to fade through a range of colours if that is possible.
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by Omu 27/12/2011, 20:56

Add this in ACP > Dispay > Generalities

Code:

<script LANGUAGE="Javascript">
<!-- ;

var rate = 25;

if (document.getElementById)
window.onerror=new Function("return true")

var objActive;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;

if (document.all) {
    document.onmouseover = doRainbowAnchor;
    document.onmouseout = stopRainbowAnchor;
}
else if (document.getElementById) {
    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
    document.onmouseover = Mozilla_doRainbowAnchor;
    document.onmouseout = Mozilla_stopRainbowAnchor;
}
function doRainbow(obj)
{
    if (act == 0) {
        act = 1;
        if (obj)
            objActive = obj;
        else
            objActive = event.srcElement;
        clrOrg = objActive.style.color;
        TimerID = setInterval("ChangeColor()",100);
    }
}
function stopRainbow()
{
    if (act) {
        objActive.style.color = clrOrg;
        clearInterval(TimerID);
        act = 0;
    }
}
function doRainbowAnchor()
{
    if (act == 0) {
        var obj = event.srcElement;
        while (obj.tagName != 'A' && obj.tagName !='#fa_ticker_container') {
            obj = obj.parentElement;
            if (obj.tagName == 'A' || obj.tagName == '#fa_ticker_container')
                break;
        }

        if (obj.tagName == 'A' && obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = objActive.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}
function stopRainbowAnchor()
{
    if (act) {
        if (objActive.tagName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}
function Mozilla_doRainbowAnchor(e)
{
    if (act == 0) {
        obj = e.target;
        while (obj.nodeName != 'A' && obj.nodeName != '#fa_ticker_container') {
            obj = obj.parentNode;
            if (obj.nodeName == 'A' || obj.nodeName == '#fa_ticker_container')
                break;
        }

        if (obj.nodeName == 'A' && obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = obj.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}
function Mozilla_stopRainbowAnchor(e)
{
    if (act) {
        if (objActive.nodeName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}
function ChangeColor()
{
    objActive.style.color = makeColor();
}
function makeColor()
{

    if (elmS == 0) {
        elmR = elmV;    elmG = elmV;    elmB = elmV;



    }
    else {
        t1 = elmV;
        t2 = (255 - elmS) * elmV / 255;
        t3 = elmH % 60;
        t3 = (t1 - t2) * t3 / 60;

        if (elmH < 60) {
            elmR = t1;  elmB = t2;  elmG = t2 + t3;
        }
        else if (elmH < 120) {
            elmG = t1;  elmB = t2;  elmR = t1 - t3;
        }
        else if (elmH < 180) {
            elmG = t1;  elmR = t2;  elmB = t2 + t3;
        }
        else if (elmH < 240) {
            elmB = t1;  elmR = t2;  elmG = t1 - t3;
        }
        else if (elmH < 300) {
            elmB = t1;  elmG = t2;  elmR = t2 + t3;
        }
        else if (elmH < 360) {
            elmR = t1;  elmG = t2;  elmB = t1 - t3;
        }
        else {
            elmR = 0;  elmG = 0;  elmB = 0;
        }
    }

    elmR = Math.floor(elmR).toString(16);
    elmG = Math.floor(elmG).toString(16);
    elmB = Math.floor(elmB).toString(16);
    if (elmR.length == 1)    elmR = "0" + elmR;
    if (elmG.length == 1)    elmG = "0" + elmG;
    if (elmB.length == 1)    elmB = "0" + elmB;

    elmH = elmH + rate;
    if (elmH >= 360)
        elmH = 0;

    return '#' + elmR + elmG + elmB;
}
// end hide -->
</script>
Omu
Omu
Active Poster

Male Posts : 1021
Reputation : 87
Language : Romanian, English

http://techtitans.forumer.ro/

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by Flappypaddles 27/12/2011, 21:30

Gyzmo wrote:Add this in ACP > Dispay > Generalities

Code:

<script LANGUAGE="Javascript">
<!-- ;

var rate = 25;

if (document.getElementById)
window.onerror=new Function("return true")

var objActive;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;

if (document.all) {
    document.onmouseover = doRainbowAnchor;
    document.onmouseout = stopRainbowAnchor;
}
else if (document.getElementById) {
    document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
    document.onmouseover = Mozilla_doRainbowAnchor;
    document.onmouseout = Mozilla_stopRainbowAnchor;
}
function doRainbow(obj)
{
    if (act == 0) {
        act = 1;
        if (obj)
            objActive = obj;
        else
            objActive = event.srcElement;
        clrOrg = objActive.style.color;
        TimerID = setInterval("ChangeColor()",100);
    }
}
function stopRainbow()
{
    if (act) {
        objActive.style.color = clrOrg;
        clearInterval(TimerID);
        act = 0;
    }
}
function doRainbowAnchor()
{
    if (act == 0) {
        var obj = event.srcElement;
        while (obj.tagName != 'A' && obj.tagName !='#fa_ticker_container') {
            obj = obj.parentElement;
            if (obj.tagName == 'A' || obj.tagName == '#fa_ticker_container')
                break;
        }

        if (obj.tagName == 'A' && obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = objActive.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}
function stopRainbowAnchor()
{
    if (act) {
        if (objActive.tagName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}
function Mozilla_doRainbowAnchor(e)
{
    if (act == 0) {
        obj = e.target;
        while (obj.nodeName != 'A' && obj.nodeName != '#fa_ticker_container') {
            obj = obj.parentNode;
            if (obj.nodeName == 'A' || obj.nodeName == '#fa_ticker_container')
                break;
        }

        if (obj.nodeName == 'A' && obj.href != '') {
            objActive = obj;
            act = 1;
            clrOrg = obj.style.color;
            TimerID = setInterval("ChangeColor()",100);
        }
    }
}
function Mozilla_stopRainbowAnchor(e)
{
    if (act) {
        if (objActive.nodeName == 'A') {
            objActive.style.color = clrOrg;
            clearInterval(TimerID);
            act = 0;
        }
    }
}
function ChangeColor()
{
    objActive.style.color = makeColor();
}
function makeColor()
{

    if (elmS == 0) {
        elmR = elmV;    elmG = elmV;    elmB = elmV;



    }
    else {
        t1 = elmV;
        t2 = (255 - elmS) * elmV / 255;
        t3 = elmH % 60;
        t3 = (t1 - t2) * t3 / 60;

        if (elmH < 60) {
            elmR = t1;  elmB = t2;  elmG = t2 + t3;
        }
        else if (elmH < 120) {
            elmG = t1;  elmB = t2;  elmR = t1 - t3;
        }
        else if (elmH < 180) {
            elmG = t1;  elmR = t2;  elmB = t2 + t3;
        }
        else if (elmH < 240) {
            elmB = t1;  elmR = t2;  elmG = t1 - t3;
        }
        else if (elmH < 300) {
            elmB = t1;  elmG = t2;  elmR = t2 + t3;
        }
        else if (elmH < 360) {
            elmR = t1;  elmG = t2;  elmB = t1 - t3;
        }
        else {
            elmR = 0;  elmG = 0;  elmB = 0;
        }
    }

    elmR = Math.floor(elmR).toString(16);
    elmG = Math.floor(elmG).toString(16);
    elmB = Math.floor(elmB).toString(16);
    if (elmR.length == 1)    elmR = "0" + elmR;
    if (elmG.length == 1)    elmG = "0" + elmG;
    if (elmB.length == 1)    elmB = "0" + elmB;

    elmH = elmH + rate;
    if (elmH >= 360)
        elmH = 0;

    return '#' + elmR + elmG + elmB;
}
// end hide -->
</script>


can you be a bit more specific, where in generalities?
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by SLGray 27/12/2011, 21:36

Administration Panel>>Display>>Homepage>>Generalities

Homepage Message


can I make scrolling announcements change colour.  Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51482
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by Flappypaddles 27/12/2011, 21:50

slg wrote:Administration Panel>>Display>>Homepage>>Generalities

Homepage Message

I tried that and it made all the widgets goto the centre panel and the forum sections disappeared from the home page the scrolling announcement did not change
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by PorkyPine V10 27/12/2011, 21:51

i tried that but it didnt work for me
PorkyPine V10
PorkyPine V10
Forumember

Male Posts : 387
Reputation : 19
Language : English, Spanish, French, Japanese

http://gfx-creators.forumotion.com/

Back to top Go down

can I make scrolling announcements change colour.  Empty Re: can I make scrolling announcements change colour.

Post by Flappypaddles 27/12/2011, 21:56

I think I may have made an error the first time I posted it because I tried again and everything was fine but not changes of colour on the scrolling announcement
Flappypaddles
Flappypaddles
Forumember

Posts : 261
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Back to top

- Similar topics

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