0 Replies Latest reply on Oct 21, 2006 5:31 AM by burtyrey

    actionscript 3, currentLabel property returning null

    burtyrey
      Hi there,

      I've created a custom button class in as3 that extends MovieClip - and linked the class to a movieclip symbol in flash 9.

      The new property "currentLabel" always seems to return null however. Does anyone know why this is not working?

      Here is the test code for my custom button class:

      public class RollOverButton extends MovieClip
      {
      public var hitArea_mc:MovieClip;

      public function RollOverButton()
      {
      trace("RollOverButton created");
      this.hitArea = hitArea_mc;
      hitArea_mc.visible = false;
      this.buttonMode = true;
      this.addEventListener(Event.ENTER_FRAME, __onEnterFrame);
      }

      private function __onEnterFrame(event:Event):void
      {
      var label:String = this.currentLabel;
      trace(this.currentLabel);
      }
      }

      Many thanks,
      burt