Chapter 8. Manipulating Data


Every day you're presented with various types of information the weather, a special on a lunch menu, the past-due amount on your credit card. Some of this information you take as is, and some you manipulate (to make it more understandable or to answer questions). For instance, if you were to receive a past-due notice on your credit card, you might want to use that card's finance rate to determine how much more money you'll owe. Taking a piece of data and using it to arrive at another piece of data is known as data manipulation, and it can be as simple as converting a person's weight from kilograms to pounds or as complicated as translating text from English to Mandarin. Regardless of its complexity, data manipulation is essential to building applications and presenting information in a useful way.

Manipulating data by converting it from one scale of measurement to another is what this temperature converter does, converting Fahrenheit values to Celsius.

graphics/08fig01.gif

In this lesson, you will manipulate both string and numerical data using expressions.

WHAT YOU WILL LEARN

In this lesson, you will:

  • Build expressions

  • Learn about precedence

  • Manipulate numbers with the Math object

  • Gain experience with the methods of the String object

APPROXIMATE TIME

This lesson takes approximately 30 minutes to complete.

LESSON FILES

Media Files:

None

Starting Files:

Lesson08/Assets/tempConverter1.fla

Lesson08/Assets/madlibs1.fla

Completed Projects:

tempConverter2.fla

madlibs2.fla



Macromedia Flash MX ActionScripting Advanced. Training from the Source
Macromedia Flash MX ActionScripting: Advanced Training from the Source
ISBN: 0201770229
EAN: 2147483647
Year: 2002
Pages: 161

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