4 Replies Latest reply on Sep 3, 2011 2:35 PM by juresti

    Set _parent variable

    juresti Level 1

      This in parent movie:

       

      var movieloaded:String;

       

       

      This code in loaded movie:

       

      _parent.movieloaded = "intro"

       

      it traces undefined? Need help!

        • 1. Re: Set _parent variable
          kglad Adobe Community Professional & MVP

           

           

          This in parent movie:

           

          var movieloaded:String;  // what timeline in the parent swf

           

           

          This code in loaded movie:

           

          _parent.movieloaded = "intro"  // what timeline in the loaded swf

           

          it traces undefined? Need help!  // when and where is your trace() executing.

          • 2. Re: Set _parent variable
            juresti Level 1

            This in parent movie:

             

            var movieloaded:String;  // This is in the first frame main timeline where it loads the swf in a movieclip

             

            _parent.movieloaded = "intro"  // This is on the main timeline of the loaded swf

             

             

             

            The trace is on the parent movie main timeline

             

            trace(movieloaded)
            if (movieloaded == "intro") {
            trace(movieloaded);
            }
            else {

             

            attachMovie("buttonblank", "butt_blank", 2, {_x: 0, _y: 0});
            butt_blank._alpha = 0;

             

            butt_blank.onRelease = function() {
                gotoAndStop(2);
            }}

             

            I'm trying to disable the button.

            • 3. Re: Set _parent variable
              juresti Level 1

              Now it is working. I used trace to check. I changed the name of ver but I dont think that matters.

              • 4. Re: Set _parent variable
                juresti Level 1

                Now I need to make it a function