2 Replies Latest reply on Apr 25, 2006 2:21 AM by Newsgroup_User

    addressing nested objects

    Level 7
      I have a movieclip in a library called "menu_item_assembly" (which is empty)
      as well as two other clips called "red_ball" (picture of a ball) and
      "display" (dynamic text field)
      Then I populate "menu_item_assembly" using code:

      attachMovie("red_ball","red_ball",1)
      red_ball.attachMovie("display","display_up",1)
      red_ball.display_up.display_text.text="back"; (line***)

      Then in the main movie I use "menu_item_assembly" like this:

      attachMovie("menu_item_assembly","time_menu",time_menu_depth);
      time_menu.red_ball.display_up.display_text.text="forward"; (this is
      actually a cut-and-paste copy of line*** with prefix time_menu.)


      When running I still have the ball with the lable reading ="back"
      typeof( time_menu.red_ball) run in the main clip returns "undefined"

      What is wrong? Do I address nested objects incorrectly?


        • 1. Re: addressing nested objects
          Xithis Level 1
          ok, well I'm drawing a blank right now, but what I do in situations like this is open the variable debugger (Debug -> List Variable) and serch for the text that I'm looking for and see if its embedded correctly. In your case search for, display_text.text and see what you find.
          • 2. Re: addressing nested objects
            Level 7
            Thanks,
            Problems start before display_up.display_text for typeof(
            time_menu.red_ball) run in the main clip returns "undefined"

            To make it easier to read, I put this problem in a separate subject. If we
            sort it out, the original problem will sort out by itself





            "Xithis" <webforumsuser@macromedia.com> wrote in message
            news:e2j8pi$a7g$1@forums.macromedia.com...
            > ok, well I'm drawing a blank right now, but what I do in situations like
            this
            > is open the variable debugger (Debug -> List Variable) and serch for the
            text
            > that I'm looking for and see if its embedded correctly. In your case
            search
            > for, display_text.text and see what you find.
            >