Skip to content

Instantly share code, notes, and snippets.

@msfeldstein
Created August 24, 2014 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msfeldstein/af29b3499c9ba8267eb4 to your computer and use it in GitHub Desktop.
Save msfeldstein/af29b3499c9ba8267eb4 to your computer and use it in GitHub Desktop.
Simulating Typing
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