I l @ ve RuBoard



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


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!


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


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


What is Math.round(0.5) ?


This rounds up to 1.


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


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


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


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 © 2008-2017.
If you may any questions please contact us: