Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
How do I make text flash between two defined colors using a custom BBcode?; Man, that's quite a topic title isn't it?
Topic Started: Sep 4 2011, 04:56 AM (1,140 Views)
PhantomSkyfire
Member
[ * ]
I am using the "Best BB Tag Code EVER" (link) to add some additional formatting options. I managed to cobble together the most of what I needed, save one code: a [blink][/blink] code. Ideally, the code would be used something like this:

[blink=#0FF,#088]This text blinks between cyan and teal.[/blink]

Initial exploration suggests that this requires Javascript. Poking around, I extracted this code from the rainbow text BBcode on that post I linked to mere sentences ago:

Code:
 
var rainbow_colors = new Array('Red','Orange','Yellow','Green','Blue','Indigo','Violet','Indigo','Blue','Green','Yellow','Orange');

function xbbb_rainbow()
{
var x = document.getElementsByTagName('span');

for(i=0;i<x.length;i++)
{
if(x[i].className == 'rainbow_text')
{
if(x[i].id==11)
{
x[i].style.color = 'red';x[i].id = "-1";
}
x[i].style.color = rainbow_colors[parseInt(x[i].id)+1];x[i].id = parseInt(x[i].id)+1;
}
}
setTimeout("xbbb_rainbow()",100);
}


Best guess is that all I'd have to do is find a way to plug a pair of hex values into that function, add a delay if one doesn't already exist, cross my fingers and pray. Unfortunately, while fairly fluent in C++ I know nothing about Javascript and have only a very tentative understanding of HTML. So, here I am, asking anyone with too much free time to link me to the other person who asked this question that I couldn't find by using search and thereby make me feel like a tremendous fool. Or, if I'm the first person to make this particular request, to write a function or equivalent simple HTML/CSS for me.

This is my first post here! Forgive any faux pass I have doubtlessly made!
Edited by PhantomSkyfire, Sep 4 2011, 05:31 AM.
Offline Profile Quote Post Goto Top
 
Quozzo-ZNS
Member Avatar
Member
[ *  * ]
your better asking on the resource forum in here
Offline Profile Quote Post Goto Top
 
PhantomSkyfire
Member
[ * ]
Quozzo
Sep 4 2011, 05:48 AM
your better asking on the resource forum in here
Then I'll do that. Can't hurt having my post in yet another location.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply