3 Replies Latest reply: May 26, 2009 1:59 PM by Ned Murphy RSS

    movieclip visible

    Toe Cutter



      I have something in AS2:


      stratBox1e.visible = false;


      which I’m trying to translate to AS3.


      I’ve read that layers can’t be made hidden anymore in AS3, but rather,

      you now focus on making the movieclips hidden instead.


      If that’s the case, how might I make “stratBox1e.visible = false;”

      (where stratBox1e is the movieclip) work in AS3.


      I currently get this error:

      1120: Access of undefined property stratBox1e.


      Thank you,

      Toe Cutter

        • 1. Re: movieclip visible
          Ned Murphy MVP

          The code you show is AS3.  Your problem is most likely that you have not assigned that as the instance name (in the properties panel) for that movieclip, or that code and that movieclip don't exist together in time.

          • 2. Re: movieclip visible
            kglad MVP

            your as2 is as3.  if that were as2, you would use _visible, not visible.


            layers could never be hidden using actionscript.  they can be hidden in authoring environment in cs3 and cs4.


            an object with pointer stratBox1e doesn't exist when your code executes.


            create an object (like a movieclip) and give it that instance name.  retest.


            (i should have known better than typing such a lengthy first response.)

            • 3. Re: movieclip visible
              Ned Murphy MVP

              That's usually my problem!