function MGscrollpane_Class (trgt, style, props) { var MyClass = this this.wh = new Object (props) super (trgt, style) } MGscrollpane_Class.prototype = new MGscrollbar_Class () var Class = MGscrollpane_Class.prototype; Class.movieclipProps = function () { var _s = this.styles var _t = this.movieclip = new Object () this._cW = this.trgt._width this._cH = this.trgt._height this._vW = this.wh.w this._vH = this.wh.h delete this.wh if (this.checkDir ("vert") == true) { var Vs = _t.VertScroller = this.Scroller.createEmptyMovieClip ("VertScroller", this.Depth ++) Vs.prop = "_y" Vs.Sprop = "_y" Vs.Sbound = "_height" Vs._Cstart = this._tY Vs._Vbound = this._vH Vs._Cbound = this._cH Vs.TSize = Number (this._vH - (_s.Track.y * 2)) var _aP = Vs.arrowProps = new Object () _aP._dirs = ["up", "down"] var b = _aP.bg = new Object () var a = _aP.ar = new Object () _aP.x1 = _s.Btn.bg.x _aP.y1 = 0 _aP.x2 = _s.Btn.bg.x _aP.y2 = this._vH - _s.Btn.bg.h b.w = _s.Btn.bg.w b.h = _s.Btn.bg.h a.w = _s.Btn.arrow.W a.h = _s.Btn.arrow.H a.x = _s.Btn.arrow.x a.y = _s.Btn.arrow.y Vs.stepPro = (33.4 * (Vs._Vbound / 100)) Vs.Spro = (100 / (Vs._Cbound - Vs._Vbound)) * Vs.stepPro Vs.Ppro = (100 / (Vs._Cbound)) * (Vs._Vbound) this.scroller_array.push (Vs) } if (this.checkDir ("hor") == true) { var Hs = _t.HorScroller = this.Scroller.createEmptyMovieClip ("HorScroller", this.Depth ++) Hs.prop = "_x" Hs.Sprop = "_x" Hs.Sbound = "_width" Hs._Cstart = this._tX Hs._Vbound = this._vW Hs._Cbound = this._cW Hs.TSize = Number (this._vW - (_s.Track.y * 2)) var _aP = Hs.arrowProps = new Object () _aP._dirs = ["left", "right"] var b = _aP.bg = new Object () var a = _aP.ar = new Object () _aP.x1 = 0 _aP.y1 = _s.Btn.bg.x _aP.x2 = this._vW - _s.Btn.bg.h _aP.y2 = _s.Btn.bg.x b.w = _s.Btn.bg.h b.h = _s.Btn.bg.w a.w = _s.Btn.arrow.H a.h = _s.Btn.arrow.W a.x = _s.Btn.arrow.y a.y = _s.Btn.arrow.x Hs.stepPro = (33.4 * (Hs._Vbound / 100)) Hs.Spro = (100 / (Hs._Cbound - Hs._Vbound)) * Hs.stepPro Hs.Ppro = (100 / (Hs._Cbound - Hs._Vbound)) * (Hs._Vbound) this.scroller_array.push (Hs) } } Class.sizeRatio = function () { for (var i = 0; i < this.scroller_array.length; i ++) { var mc = this.scroller_array [i] mc._sRatio = (mc.TSize - mc.Slider_mc [mc.Sbound]) / 100 mc._sDem = 100 / (mc.TSize - mc.Slider_mc [mc.Sbound]) mc._cRatio = (mc._Cbound - mc._Vbound) / 100 mc._cDem = 100 / ((mc._Cbound) + mc._Vbound) } this.MaskC (); } Class.checkDir = function (Type) { switch (Type) { case "hor" : if (this._cW > this._vW) { var _B = new Boolean (true) } else { var _B = new Boolean (false) } break; case "vert" : if (this._cH > this._vH) { var _B = new Boolean (true) } else { var _B = new Boolean (false) } break; } return _B } Class.MaskC = function () { this.trgt.setMask (this.Mask_mc) }