4 Replies Latest reply on Mar 13, 2013 3:12 PM by pauland

    Objects

    fsoender Level 1

      How can I make 3 objects be stored in one object?

      How is that done?

       

      NewOject = Obj1, Obj2, Obj3

        • 1. Re: Objects
          pauland Level 4

          var newObject:Object = { obj1:object1, obj2:object2, obj3:object3};

          1 person found this helpful
          • 2. Re: Objects
            fsoender Level 1

            Im trying to send two objects thru my view, I get it to work with one object like this: "navigator.pushView(ToolView, tmpObj1;"

            But when I try to send two object to view I cant get it to work.

             

            Anyone that can help me out?

             

             

            View 1:

             

             

            protected function handleClick(event:MouseEvent):void

                                      

                                {           

                                       var tmpObj3:Object = new Object();                         

                                       tmpObj3.AntennaSelected_3= AntennaSelected;   

                                      

                                      

                                       var tmpObj1:Object = new Object();                         

                                       tmpObj1.Tool1Selected_1 = ToolSpinnerTool1Selected;

                                      

                                      

                                       var tmpObj2:Object = new Object();                   

                                       tmpObj2.Tool2Selected_2 = ToolSpinnerTool2Selected;

                                      

                                                                 

                                }

            View 2:

             

            <s:Label id="lblName1" x="263" y="42" width="45" height="22" text="{data.Tool1Selected_1}"/>

                  

                   <s:Label id="lblName2" x="186" y="42" width="53" height="24" text="{data.Tool2Selected_2}"/>

                  

             

             

            I have tried these options without any luck:

             

                          var ItemsSelected:Object = {tmpObj1:Object, tmpObj2:Object};            

                         navigator.pushView(ToolView, {tmpObj1, Object2});

                          navigator.pushView(ToolView, tmpObj1, tmpObj2);

                          navigator.pushView(ToolView, [tmpObj1, tmpObj2]);

             

             

             

            • 3. Re: Objects
              fsoender Level 1

              Got it to work, thanks for the help

              • 4. Re: Objects
                pauland Level 4

                Glad you got there in the end!