Actionscript 3.0 for beginners: lesson # 4
Tuesday, 11 November, 2008Resume our sample code of TicTacToe (which is entirely on Google Code) and we start to analyze it in detail.
Import definitions
With Actionscript 3.0 has been done a great job of cleaning and arrangement of classes nell'alberatura (contained in the package package) used during development. In other programming languages, like C for example, when you want to use a feature must explicitly "import" in the code. This operation "import" is necessary to allow the compiler to have all the codes and definitions related features that we want to use. In Actionscript 3.0, however, Education import should not be confused with the standard C / C + #include # #include Actionscript 3.0 provides education include that is identical to #include the C / C + +. The latter include "actual code that, if used or not, is compiled into the final. Education import is the highest level and is more "intelligent" being compiled. It serves primarily to access classes without having to specify the full name. In Alré words instead of using forms like this:
- . MovieClip = new flash. display . MovieClip ( ) ; var myMC: flash. display. MovieClip = new flash. display. MovieClip ();















