Reading Project

By Jessica Pressman, Mark C Marino and Jeremy Douglass

Reading Project

Annotation -- Source Code -- mainInterval

mainInterval = setInterval(updateWords, textMilliseconds);

From Reading Project

In ActionScript 2, “setInterval” is a timed function, essentially a loop. In this declaration, mainInterval begins a loop of the function “updateWords” that takes place every “textMilliseconds,” which has already been assigned to 0.2. So this first call in the code that displays words begins a loop at a regular interval. “updateWords” is another function call that performs two operations: to advance the spam array65 and to call another loop: killInterval. Note that updateWords does not update the story words but instead the spam words, which is why the first word of the story is a spam word.
(Reading Project, 128)

Contents of this annotation:

This page has paths: