4 Replies Latest reply: Aug 8, 2012 7:24 AM by kglad RSS

    misterios class properties

    dfsg434534535fsf

      Hello,

       

      I'm quite new to flash development.

      I'm struggling for many hours to understand the origin of several properties and their hierarchy inside as3 linked class.

      The setup is:

      layers.png

      there is a mask layer with several masked layers.

       

      There is a movie clip for each of masked layers in libarary (some of it linked to as3):

      classes.png

      I added layer label inside () next to name of each movie clip

      Also for PhotoContainer movie clip there is external as3 class

       

      In flash debugger i also see the following hierarchy of display objects:

       

      Stage -> MaskArea -> photoGuideContainer (movieclip) -> photoGuide (PhotoContainer)

      Stage -> MaskArea -> photoDrag (PhotoDrag) -> photoContainer (PhotoContainer)

      Stage -> MaskArea -> masker (Masker)

      Stage -> MaskArea -> masker (Masker)

      Stage -> MaskArea -> collisionArea (Masker)

      Stage -> MaskArea -> bg (movieclip)

       

      as3 code in application classes does direct manipultion with above properties like:

       

      maskArea = new MaskArea();

      var pc:PhotoContainer = maskArea.photoDrag.photoContainer;

      ...

       

      without ever creating/relating these display objects.

       

      My questions are:

       

      1. Where are all these objects come from ?

      2. How the display object hierarchy is created ?

      3. How photoGuide becomes an instance of PhotoContainer (see above Stage -> MaskArea -> photoGuideContainer (movieclip) -> photoGuide (PhotoContainer)) ?

       

      Thank you.

        • 1. Re: misterios class properties
          kglad MVP

          a.  you can't determine what's on stage by checking layer names.  unlock them, click a keyframe and check the highlighted on-stage objects to check their library symbol

          b.  maskArea=new MaskArea() does create a new displayobject.

           

          1.  all on-stage objects you see when testing are either on-stage in the ide or created with actionscript

          2. if, by hierarchy you mean depth, it is determined by the layer order (for ide created objects) and by the order objects are added to the display list (addChild) for actionscript created objects (unless addChildAt is used).

          3. photoGuide isn't an instance of PhotoContainer.  photoGuide is a child of photoGuideContainer.

          • 2. Re: misterios class properties
            dfsg434534535fsf Community Member

            3. photoGuide isn't an instance of PhotoContainer.  photoGuide is a child of photoGuideContainer.

            here is a screenshot from debugger (monster debugger):

            debug.png

            I'm asking how this hierarchy is created? Here you see that photoGuide is instance of PhotoContainer.

            And i have similar question like Where the "collisionArea" name came from ? it is not in the library, and not in the code...

            • 3. Re: misterios class properties
              dfsg434534535fsf Community Member

              I finally realized what i'm missing. No mistery here:

              1. Movie clips were embedded each into other (this explains the certain hierarchy)

              2.Some layers were merged. (that explains the mistery )

               

              thanks

              • 4. Re: misterios class properties
                kglad MVP

                you're welcome.