3 Replies Latest reply on Nov 21, 2006 9:35 PM by kglad

    field name (basic newb problem)


      I'm only a few months into deep actionscripting for the web, and have encountered a simple problem that I personally can't solve. I'm confident someone here can help me.

      basically, I have a movie attached called bottleInfo. Inside bottleInfo is a button named blueButton. What I want to do is make blueButton attach another movie called bluePage.

      The code I'm using is as such:

      attachMovie("bottleInfo", "bottleInfo", 1);

      attachMovie("bluePage", "bluePage", 2);

      the problem lies in the bolded line, in which I get the statement Expected a field name after '.' operator.

      how do I correctly call this button to load attach the movie?

        • 1. Re: field name (basic newb problem)
          ggshow Level 2
          try this:

          • 2. Re: field name (basic newb problem)
            sol_martin Level 1
            the code seems to be working from a "no errors" aspect, but I am not seeing what I need. To make sure I'm doing this right, if I make a movieclip, and name it, while also giving it an identifier (in this case bluePage), is there elsewhere I should give it a name to work?

            also, and this may or may not make a difference - the bottleInfo attachMovie code is on the root, and the blueButton button is within the bottleInfo clip. The bluePage movie is also a seperate clip, but loaded into a new level. This entire line of code is being called from the root, to load things in.

            I hope I make sense there. Tried to get all my pieces in!
            • 3. Re: field name (basic newb problem)
              kglad Adobe Community Professional & MVP
              bluePage is not loaded into a new level but it is instantiated in depth 2 of bottleInfo.blueButton.

              on bottleInfo's timeline you need to have the instance name blueButton attached to your movieclip that you want to use as a button.

              and to give a linkage id, you need to right click on a movieclip in the library, click linkage, tick export for actionscript and assign the appropriate linkage id (in your situation, bottleInfo for the movieclip that contains blueButton, and bluePage for the one that you want to attach when bottleInfo.blueButton is released.