1 scrambling shoutout box Sun Mar 15, 2009 6:08 pm
xoxogettezki
Guest
i really liked the trick.
it looks kinda annoying at first,
but the viewers will definitely guess what the words are .
click for spoiler
**change the phrases in bold letters into your own messages.
save it as a javascript file.
screenshot:
CREDITS TO:
*FSTalk
*Kuya Vince for making me understand the codes
it looks kinda annoying at first,
but the viewers will definitely guess what the words are .
click for spoiler
- Spoiler:
- function scroll(message_loop)
{
var messages = new Array();
messages[0] = "I'ma Live Your Life!";
messages[1] = "my lucky clover";
messages[2] = "ily...";
messages[3] = "JessIanne[13]";
messages[4] = "***gette gette";
if(message_loop >= messages.length)
{
message_loop = 0;
}
var old_value = window.document.scroll_form.banner.value;
//scram
var new_value;
var random = Math.floor(Math.random() * messages[message_loop].length);
var change_letter = messages[message_loop].charAt(random);
if(old_value == messages[message_loop])
{
message_loop++;
setTimeout("scroll("+message_loop+")",4000);
return;
}
if(change_letter == old_value.charAt(random))
{
scroll(message_loop);
return;
}
var first_part = old_value.substring(0,random);
random++;
var last_part = old_value.substring(random,messages[message_loop].length);
var new_value = first_part + change_letter + last_part;
window.document.scroll_form.banner.value = new_value;
setTimeout("scroll("+message_loop+")",200);
}
var dk09 = "<form name=\"scroll_form\" style=\"text-align:center;\">"+
"<input type=\"text\" size=\"35\" value=\"Shouting Out\" name=\"banner\">"+
"</form>";
document.getElementById('cpShoutoutBox').style.height='100%';
document.getElementById('cpShoutoutBox').style.overflowY='hidden';
document.getElementById('cpShoutoutBox').innerHTML = "<table width='100%'><tr><td align='center'>"+dk09+"</td></tr></table>";
scroll(0);
**change the phrases in bold letters into your own messages.
save it as a javascript file.
screenshot:
CREDITS TO:
*FSTalk
*Kuya Vince for making me understand the codes