[code]
var maxPage:int = Math.ceil(this.data.length / this._pageSize);
public function set currentPage(value:int):void {
var oldPageIndex:int = this._currentPage;
var page:int = oldPageIndex;
if(value > oldPageIndex){
page = Math.min(this._maxPage,value);
}else {
page = Math.max(1,value);
}
if(page != oldPageIndex){
this._currentPage = page;
this.redraw();
}
}[/code]
var maxPage:int = Math.ceil(this.data.length / this._pageSize);
public function set currentPage(value:int):void {
var oldPageIndex:int = this._currentPage;
var page:int = oldPageIndex;
if(value > oldPageIndex){
page = Math.min(this._maxPage,value);
}else {
page = Math.max(1,value);
}
if(page != oldPageIndex){
this._currentPage = page;
this.redraw();
}
}[/code]