• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: XI Classes > Adding Methods to Built-in Classes

Chapter 43. Adding Methods to Built-in Classes

DO OR DIE

  • This fancy AS2 is just fancy wrapping—it's compiled into AS1.

  • This is actually good—it means you can do stuff that's easy in AS1 but well nigh impossible in AS2.

I already mentioned that AS2 is compiled into AS1. Thus, we shouldn't be too surprised to hear that AS1 code works fine in MX2004. In order to add methods to built-in classes like Array, Strong, Math, and XML, we have to dive into AS1 code and use something called a prototype.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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