Thursday, January 7, 2010

Letter Scramble (WIP)



Large version.

Okay, this project is not quite 100% finished, but I'm not sure what else I'm going to do with it.

Not much to say about it. Type something in the white field and then click the grey INPUT button. Once the button is clicked, whatever is in the text field is split up using Flash's .split() ability. Each letter is sent into an array in order. From there, a movie clip is added for each letter. This movie clip has a target letter which is what we want the movie clip to ultimately display.

The randomization is achieved by having an array of possible letters (a-z, and A-Z). Every 2 frames, the text field is filled with a random letter from the array until this swap has happened a set number of times (25*letter position+10). When the set number has been reached, BAM! The field is then filled in with that target letter from earlier.

I plan to flesh this out and maybe even use it in a useful way in the future, so if you have any suggestions, let me know!

EDIT: Linda asked about having all of the letters stop at the same time. Here's a .fla file that contains the code that does that.

3 comments:

  1. why cant i do single letters/digits?
    is there anyway they can stop at the same time because they all do a waterfall effect or was that the purpose

    ReplyDelete
  2. Okay, I fixed up the single character thing. Weirdly though, if you type in a single character at the beginning, you sometimes wind up with an extra blank space. Dunno what's up with that! It's almost like a " " is being pushed into the letter array.

    And yes, you can have them all stop at the same time. I'll send you the .fla and .as file containing one that does it.

    ReplyDelete
  3. I'm into this one as well. Def could have thousands of uses. You've really got some good shit going on here Corey.

    ReplyDelete