QA

I l @ ve RuBoard

Q&A

Q1:

What is the largest number that you can represent in ActionScript?

A1:

It's a pretty big number. Using the ActionScript Number.MAX_VALUE constant, you can find out that it is 1.79769313486231e+308. The "e+308" means that you can move the decimal point over 308 places to the right!

Q2:

What if I want to use the real value of pi, rather than approximations such as 3.14?

A2:

Use the constant Math.PI . It resolves to 3.14159265358979, which is still an estimation, but it is much more accurate than 3.14.

Q3:

What is Math.round(0.5) ?

A3:

This rounds up to 1.

Q4:

Do I have to convert a number into a string before I place it into a text field?

A4:

No. This conversion is not needed. A text field displays a number just as easily as a string.

Q5:

When should I use attachMovie and when should I use duplicateMovieClip ?

A5:

Because duplicateMovieClip leaves its original in place, it usually works out that you want to use attachMovie instead. Otherwise, you will always have the first movie clip to deal with in some way. However, duplicateMovieClip comes in handy when you want to have a movie clip script attached to each new instance that you create.

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