home page icon Flash Bestiary / Fun with Text / Underwood
   

Underwood

This text input movie is intended to provide an experience similar to an old manual typewriter.

Click on the white 'paper' and then type a few lines. Be sure to use the backspace a bit too, so you can see the overstrike effect.

To make this movie, I started with a simple script that triggered movies that play sound effects, as shown below.


paper_mc.onKeyUp = function()
{
  switch (Key.getCode()) {
  case Key.SHIFT: shift_mc.gotoAndPlay(2); break;
  }
}

paper_mc.onKeyDown = function()
{
  switch (Key.getCode()) {
  case Key.SHIFT: shift_mc.gotoAndPlay(2); break;
  case Key.ENTER: ding_mc.gotoAndPlay(2); break;
  default: thunk_mc.gotoAndPlay(2); break;
  }
}

Key.addListener(paper_mc);

Because of the overstrike effect, I couldn't use a single text field. Instead each letter is a separate text field. I added a script that keeps track of the current position on the paper, and adds the individual letters.

 

sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: World's Shortest and Most Boring Adventure Game

Having trouble opening the project? You may need to Upgrade to Flash MX 2004



Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback