6 Replies Latest reply on Aug 25, 2007 9:14 PM by doug777

    Stacking panels from different modules.

    aceinc Level 1
      I have application "a" which calls module "b", which calls module "c". Module "c" is larger than the empty area left by module "b". It displays behind module "b" and even if I click into the panel in module "c" it stays hidden behind "b".

      What I would like is to pop module "c's" panel on top of "b" partially obscuring it, and allowing switching between the panels by clicking anywhere in them.

      Is this possible, if so where can I find some thing to point the way?

      Paul
        • 1. Re: Stacking panels from different modules.
          doug777 Level 1
          Take a look at Programming ActionScript 3.0 > Overview of ActionScript Programming > Display Programming in the Help files.

          Doug
          • 2. Re: Stacking panels from different modules.
            aceinc Level 1
            OK, I read the manual. What I came away with is the following line of code;

            parentApplication.setChildIndex(parentApplication.getChildByName["modWardDetail"].pnlWardD etail, parentApplication.numChildren - 1);

            By way of explanation, I am loading a module;

            <mx:ModuleLoader id="modWardDetail" x="10" y="34" error="errorHandler(event)"/>

            that contains the swf file that contains the above referenced line of code. When the parentApplication.setChildIndex... line of code is executed it generates the following error;

            ReferenceError: Error #1069: Property modWardDetail not found on builtin.as$0.MethodClosure and there is no default value.

            To debug I displayed all of the children using a loop with;

            Alert.show(parentApplication.getChildAt(i).name);

            modWardDetail was in the list of children.

            So where do I go from here?

            Paul

            • 3. Re: Stacking panels from different modules.
              aceinc Level 1
              BTW I get the same results with the line;

              parentApplication.setChildIndex(parentApplication.getChildByName["modWardDetail"], parentApplication.numChildren - 1);

              Paul
              • 4. Re: Stacking panels from different modules.
                doug777 Level 1
                Surely it should be

                parentApplication.setChildIndex(parentApplication.getChildByName("modWardDetail"), parentApplication.numChildren - 1);

                Doug
                • 5. Re: Stacking panels from different modules.
                  aceinc Level 1
                  Doug,

                  Yes I should have used parenthethes, and not brackets.

                  Thanks for the hlp.

                  You wouldn't know how to get the name of the module that "this" is currently running in would you? My thought is to put this code at the parent and then I can call it passing the module.

                  Paul
                  • 6. Re: Stacking panels from different modules.
                    doug777 Level 1
                    The best way to find out these sort of things is to put a breakpoint in the code shortly after the module is created, run the debugger, then look through the variables listing to see if the module name shows up anywhere. If it does then you can access it exactly as it shows up in the listing.

                    Doug