Sunday, January 31, 2010

AS3 class for finding four-letter words

When I created the game Merge (flashbynight.com/merge), I created an AS3 class that can be used to:

1 Check the validity of a four letter word
2 Choose a four letter word at random

This could come in useful for anyone interested in creating word games. It weighs in at 22k, but contains all the four-letter words in English.

The class is FourLetterList.as and to get a four-letter word, use the function return_random_word(); To check if a word exists, use check_validity("word"); and it will return TRUE or FALSE.

The class and a sample .fla can be downloaded here: http://www.esnips.com/doc/0eeae33e-a79e-4dcd-884a-a6f09c0ef687/4word



Hope it comes in useful.

1 comment:

  1. someone's snoozing, January high scores are still showing instead of new February scores!!!

    ReplyDelete