0 Replies Latest reply on Mar 20, 2007 10:48 AM by gberkman

    using tween class in a component

    gberkman
      hi, I have made a list menu component and it uses transitions.Back tween when open and close. Before compiling as SWC, that is as a movieclip, the component works well but after compiling as swc and import in another document, tween functions does not work. Why can I not use this classes in a component? Here is the code :

      #initclip
      import mx.transitions.Tween;
      import com.robertpenner.easing.*;
      //---------------------------------------------------------------------------------------
      //constructor
      function MultiListMenuClass() {
      this.isOpen = false;
      this.columnNumber = -1;
      }
      //---------------------------------------------------------------------------------------
      //inherit from the MovieClip Class
      MultiListMenuClass.prototype = new MovieClip();
      //---------------------------------------------------------------------------------------
      //methods
      MultiListMenuClass.prototype.open = function() {
      openTween = new Tween(this, "_y", Back.easeOut, this._y, this._height-40, 0.5, true);
      this.isOpen = true;
      };
      MultiListMenuClass.prototype.close = function() {
      closeTween = new Tween(this, "_y", Back.easeIn, this._y, 0, 0.5, true);
      this.isOpen = false;
      };