View Full Version : HELP [+REP]
iLogan
20-03-2011, 02:18 PM
How does Habbox do that flashing text thingy
Look at this guys profile. (http://www.habboxforum.com/member.php?u=69954)
Thanks
+REP
xox
Trinity
21-03-2011, 12:15 AM
How does Habbox do that flashing text thingy
Look at this guys profile. (http://www.habboxforum.com/member.php?u=69954)
Thanks
+REP
xox
Javascript.
Say you had like, <div id='loltest'>Username</div>, set a base font colour for #loltest. You could then put each letter of 'Username' into separate <span>s, cycle through the <span>s using one of many possible methods that I can't be bothered to type, set a slightly lighter font colour for the selected <span>, wait for a few milliseconds, remove the font colour, repeat for the following spans.
That's the way I'd do it anyway, not sure if it's the best way.
I'm not too confident with my javascript skillz, so I won't write the actual code for it, but you should be able to work it out if you understand the logic. If not, let me know and I'll attempt it.
iLogan
21-03-2011, 04:32 PM
Sadly - I can't code in Javascript - could you give it a go for me?
Kronics
21-03-2011, 04:59 PM
If you want to learn how to do Javascript, this should be usefull :)
Click here. (http://www.w3schools.com/js/default.asp)
badboyxlr
21-03-2011, 06:37 PM
This is the code the vars color and speed, are the speed in seconds and the name of the collour or the HEX.
Click here (http://www.aidantaylor.net/html/glow.html) for working example.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Glow</title>
<script type="text/javascript" src="http://www.aidantaylor.net/javascript/jquery-1.5.js"></script>
<script type="text/javascript" src="http://www.aidantaylor.net/javascript/glow.js"></script>
<script type="text/javascript" src="http://www.aidantaylor.net/javascript/jquery.color.js"></script>
<script type="text/javascript">
var speed=2;//seconds
var color="#ce0000";//color of glow
//anything with the id "glow" will have this effect
function glow(){$(document).ready(function(){$('#glow').glo w({glowColor: color,glow : true,sparkle : true});});}$(document).ready(function(){$('#glow') .glow({glowColor: '#ce0000',glow : true,sparkle : true});});var int=speed*1000;setInterval(glow, int);
</script>
</head>
<body>
<p id="glow">Glowing text</p>
</body>
</html>
iLogan
21-03-2011, 06:53 PM
Thanks +REP /closed.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.