home *** CD-ROM | disk | FTP | other *** search
/ i·claim - visualizing argument / ICLAIM.ISO / mac / t_05.swf / scripts / frame_10 / DoAction_2.as next >
Text File  |  2005-02-25  |  809b  |  31 lines

  1. function Update()
  2. {
  3.    var _loc1_ = (movScroller._y - movMask._y) / movMask._height;
  4.    trace("ratio=" + _loc1_);
  5.    f = Math.round(_loc1_ * movIn._totalframes);
  6.    if(f < 1)
  7.    {
  8.       f = 1;
  9.    }
  10.    movIn.gotoAndStop(f);
  11.    trace("f=" + f);
  12.    trace(movIn._y);
  13. }
  14. top = this.movMask._y;
  15. bottom = this.movMask._y + this.movMask._height - this.movScroller._height;
  16. left = this.movMask._x;
  17. right = this.movScroller._x;
  18. trace("top=" + top + " bottom=" + bottom + " left=" + left + " right=" + right);
  19. this.movScroller.onMouseDown = function()
  20. {
  21.    startDrag("movScroller",0,right,top,right,bottom + 10);
  22.    trace("start drag");
  23.    scrollInt = setInterval(Update,10);
  24. };
  25. this.movScroller.onMouseUp = function()
  26. {
  27.    stopDrag();
  28.    trace("stop drag");
  29.    clearInterval(scrollInt);
  30. };
  31.