2 Replies Latest reply on May 15, 2008 2:53 PM by dazzlah

    movie clip buttons wont operate movie clip

    dazzlah
      I've created a set of movie clip buttons which change colour when clicked for ease of navigation, They work fine but they do not load the seperate swf file when using this code:

      _root.but1.onRelease = function()
      {
      _root.loading.loadMovie("availablemenue.swf");

      }

      Any ideas where im going wrong?
        • 1. movie clip buttons wont operate movie clip
          Ned Murphy Adobe Community Professional & MVP
          The code you show works as long as things are where the code says they are and they are spelled correctly, so you may want to doublecheck that the things you code as _root objects exist in the _root.

          You're much better off in the long run if you avoid using _root references unnecessarily. The button's onRlease function should be in the same level as the button, so it shouldn't need the _root reference. The same may be true for the 'loading' object
          • 2. Re: movie clip buttons wont operate movie clip
            dazzlah Level 1
            ok so in the button level will look something like this?


            this.onRollOver = function(){
            if( index != _root.currentSection ){
            gotoAndPlay("over");
            }
            }
            this.onRollOut = function(){
            if( index != _root.currentSection ){
            gotoAndPlay("out");
            }
            }
            this.onRelease = function(){
            if( index != _root.currentSection ){
            _root.switchSectionTo(index);
            gotoAndPlay("click");
            }
            }

            //---------------

            _root.but1.onRelease = function()
            {
            _root.loading.loadMovie("availablemenue.swf");

            }