Created
August 24, 2014 19:42
-
-
Save msfeldstein/af29b3499c9ba8267eb4 to your computer and use it in GitHub Desktop.
Simulating Typing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = "Oh Hey Dudes" | |
textfield = new Layer | |
width: Screen.width | |
height: 50 | |
backgroundColor: "black" | |
index = 0 | |
typeCharacter = () -> | |
textfield.html = string[0..index] | |
index++ | |
if index < string.length | |
setTimeout typeCharacter, 100 | |
typeCharacter() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment