• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint