1 Reply Latest reply on Jul 18, 2007 11:33 PM by SymTsb

    MovieClip Buttons

    Paymon_JG Level 1
      Well, for my site i have a movieClip called mMainMenu. Inside that movieClip are seven other movieclips, each on their own layer. These seven movieclips are being used as buttons to navigate the site. The problem comes in with the AS3 code for my MOUSE_OVER event. I get an error that i do not understand. Please please please help me.here is my code.

      note: the main movieclip on the root timeline is called mMainMenu. the button inside has the instance name of bLinks

      bLinks.addEventListener(
      MouseEvent.MOUSE_OVER,
      function(evt:MouseEvent):void {
      bLinks.gotoAndPlay("over");
      trace("I've been Rolled Over!");
      }
      );

      i have also tried:

      mMainMenu.bLinks.addEventListener(
      MouseEvent.MOUSE_OVER,
      function(evt:MouseEvent):void {
      mMainMenu.bLinks.gotoAndPlay("over");
      trace("I've been Rolled Over!");
      }
      );

      the error i'm receiving is:

      1120: Access of undefined property bLinks.
        • 1. Re: MovieClip Buttons
          SymTsb Level 2
          is bLinks an instance name for a button? based on what you said, you need to define the default class for an individual button (I assume each is identical and made from a single symbol in the library). This is done from properties for that library item. Then you call that class with the new operator. After that, you can define the event listeners to make rollovers and such work.