Summary

I l @ ve RuBoard

You can detect key presses in many different ways. One way is to use on ( keypress ) handlers attached to a button. You can also write ActionScript code that uses the Key.isDown function to check a key at any given time. With listeners, your code can be alerted any time a user presses a key.

To get longer pieces of user input, you can create input text fields. These can be linked to variables so that the contents of the input text can be read by ActionScript. You can use input text areas to get a single character, a word, a line, or many lines of text input.

After you have a string in ActionScript, you can manipulate it in many ways. Operators such as + and += can be used to concatenate strings. You can use substring and substr to get a portion of a string. You can also use indexOf to find the location of one string inside another.

I l @ ve RuBoard


Sams Teach Yourself Flash MX ActionScript in 24 Hours
Sams Teach Yourself Flash MX ActionScript in 24 Hours
ISBN: 0672323850
EAN: 2147483647
Year: 2002
Pages: 272

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net