The Guy above me is a troll because...

Recommended Videos

Lazy Kitty

Evil
May 1, 2009
20,147
0
0
For thinking it was clever to use JavaScript to show your database of your email addresses, usernames, passwords and IPs on the screen for everyone!
 

Heart of Darkness

The final days of His Trolliness
Jul 1, 2009
9,745
0
0
For being wrong about what I wanted to do!

I'm trying to emulate printing out a string to the screen like this [http://www.youtube.com/watch?v=uR7ZqCYNXYQ], but so fat the best I can manage is either getting the entire string to print at once or just get the first character printed. I've already tried it three ways.
 

Lazy Kitty

Evil
May 1, 2009
20,147
0
0
For "You mean like the way it's typed character per character? Can't you put all characters in an array and then print every single one each in tags which are marked for a custom name or type, then constantly overwriting the css code to character per character change their color from the background color to a different color?"
 

Heart of Darkness

The final days of His Trolliness
Jul 1, 2009
9,745
0
0
For bah. I typed up a whole response and accidentally closed the window.

Let's see if I can type this up again.

I don't think my issue is with using an array; by default, a string tied to a variable is automatically treated like an array (tested). I don't know CSS, either, so that's out of the question. I'm also trying to not have it printed out all at once, even if individual character's aren't immediately visible.

My problem is getting my functions to wait before they blat things out to the screen. So far, I've tried using the setTimeout function with a loop, the setTimeout function with a recursive call, and a function I pulled from the web designed to make the computer wait (and I used that with a loop). But I've had problems with them so far. The first method doesn't work: trying to call the string character using the setTimeout function results in my program telling me that the variable I use to control my for loop's iterayions isn't initialized (ironically, i times). Using it as part of a recursive function results in only the first character being printed to the screen. And using the freeze function works; except the entire string is printed out at once and my computer freezes for the interval I want it to freeze times how many times I've called it through the loop.

I can try initializing the string to a new Array, but I doubt it's going to work. I'm probably going to also try it with a text field, although I think that that's not going to work, either.

EIDT: Huh. Using a text field made it work. Weird.
 

Lazy Kitty

Evil
May 1, 2009
20,147
0
0
For thinking it matters how flimsy an accusation is!
[sup]Guilty until proven otherwise.[/sup]

Also: You should try looking into CSS once, it's really easy to use.
(Since it only defines how things look, without changing anything to the structure, it would make changing the style of your websites a whole lot easier)
 

Heart of Darkness

The final days of His Trolliness
Jul 1, 2009
9,745
0
0
For thinking I'm not going to look into CSS!

And I actually got it to work using text fields. But once I tried adding the ability for the user to change the values, it kinda borked itself. It still worked, for the most part, except the strings were printing with practically no delay. But hey, I got it to work the way I wanted it to.