public/javascripts/yui/carousel/carousel-debug.js
function(last) {
            var carousel    = this,
                numItems    = carousel.get("numItems"),
                numVisible  = carousel.get("numVisible"),
                reveal      = carousel.get("revealAmount"),
                first       = carousel._itemsTable.items.length,
                lastVisible = carousel.get("lastVisible");

            // adjust if going backwards
            if(first > last && last+1 >= numVisible){
                // need to get first a bit differently for the last page
                first = last % numVisible || last == lastVisible ? last - last % numVisible : last - numVisible + 1;
            }

            if(reveal && last < numItems - 1){ last++; }

            if (last >= first && (!carousel.getItem(first) || !carousel.getItem(last))) {
                carousel.fireEvent(loadItemsEvent, {
                        ev: loadItemsEvent, first: first, last: last,
                        num: last - first + 1
                });
            }

        }
function(last) {
            var carousel    = this,
                numItems    = carousel.get("numItems"),
                numVisible  = carousel.get("numVisible"),
                reveal      = carousel.get("revealAmount"),
                first       = carousel._itemsTable.items.length,
                lastVisible = carousel.get("lastVisible");

            // adjust if going backwards
            if(first > last && last+1 >= numVisible){
                // need to get first a bit differently for the last page
                first = last % numVisible || last == lastVisible ? last - last % numVisible : last - numVisible + 1;
            }

            if(reveal && last < numItems - 1){ last++; }

            if (last >= first && (!carousel.getItem(first) || !carousel.getItem(last))) {
                carousel.fireEvent(loadItemsEvent, {
                        ev: loadItemsEvent, first: first, last: last,
                        num: last - first + 1
                });
            }

        }
function ( last ) { var carousel = this , numItems = carousel . get ( "numItems" ) , numVisible = carousel . get ( "numVisible" ) , reveal = carousel . get ( "revealAmount" ) , first = carousel . _itemsTable . items . length , lastVisible = carousel . get ( "lastVisible" ) ; // adjust if going backwards if ( first > last && last + 1 >= numVisible ) { // need to get first a bit differently for the last page first = last % numVisible || last == lastVisible ? last - last % numVisible : last - numVisible + 1 ; } if ( reveal && last < numItems - 1 ) { last ++ ; } if ( last >= first && ( ! carousel . getItem ( first ) || ! carousel . getItem ( last ) ) ) { carousel . fireEvent ( loadItemsEvent , { ev : loadItemsEvent , first : first , last : last , num : last - first + 1 } ) ; } }
The load the required set of items that are needed for display.

@method _loadItems
@protected
The load the required set of items that are needed for display .