The forum of the forums
Welcome to the Official Support Forum of Forumotion!

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've not yet.



Create a free forum like this one.

can I make scrolling announcements change colour.

View previous topic View next topic Go down

can I make scrolling announcements change colour.

Post by Flappypaddles on December 27th 2011, 8:13 pm



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.
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by Omu on December 27th 2011, 8:56 pm

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>
avatar
Omu
Active Poster

Male Posts : 1019
Reputation : 87
Language : Romanian, English, French
Location : Romania

http://supportdrops.com/

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by Flappypaddles on December 27th 2011, 9:30 pm

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?
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by SLGray on December 27th 2011, 9:36 pm

Administration Panel>>Display>>Homepage>>Generalities

Homepage Message


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

avatar
SLGray
Administrator
Administrator

Male Posts : 38737
Reputation : 2602
Language : English
Location : United States

http://classifiedads.forumotion.com/

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by Flappypaddles on December 27th 2011, 9:50 pm

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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by PorkyPine V10 on December 27th 2011, 9:51 pm

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

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

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

Back to top Go down

Re: can I make scrolling announcements change colour.

Post by Flappypaddles on December 27th 2011, 9:56 pm

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
avatar
Flappypaddles
Forumember

Posts : 251
Reputation : 1
Language : english

http://inaflap.forumotion.co.uk

Back to top Go down

View previous topic View next topic Back to top


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