2 Replies Latest reply on Nov 18, 2013 8:00 AM by Amy Blankenship

    What are Classes?

    mrczex32

      What are Adobe Flash CC Classes?

        • 1. Re: What are Classes?
          moccamaximum Level 5

          in a nutshell:

          Templates that are used in Object Oriented Programming to organize your code.

          In Flash classes are organized in packages, that resemble a folder structure.

           

          for example the import statement:

           

          import flash.display.MovieClip;

           

          tells the compiler that the class MovieClip sits in a package "display", which sits in a package "flash".

          Its basically a Textfile (with the file appendix .as)

          You can view its contents via the API:

          http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/MovieClip .html

           

           

          for details: http://en.wikipedia.org/wiki/Class_%28computer_programming%29

          1 person found this helpful
          • 2. Re: What are Classes?
            Amy Blankenship Level 4

            To add to what moccamaximum said and give it more of a "flash-specific" spin, you can specify a Class in the "Base Class" field of a symbol, which will allow you to "apply" behaviors to the symbol without coding on the timeline. For instance, if you had a "YesNo" Class, you could set that as the Base Class of any MovieClip that had a Yes button and a No button in it to do something  specific when one of the buttons is clicked.

             

            Good design would indicate that you'd want to just convert the click events into "yes" and "no" events and deal with them higher up, but some people will also have the YesNo Class try to reach out to other parts of the application and do things directly (not advisable, but possible).

             

            You can also apply a Class to the entire fla/swf. and this is referred to as the Document Class. The Document Class could be the "higher up" I referred to earlier, but isn't necessarily that place.