void (int frame, int totalFrames, int cycle) { int delay = totalFrames / 2; int frameAfterDelay = frame - delay; if (frameAfterDelay > 0) { myMouseOverScrollbarExpandLevel = frameAfterDelay / (float)(totalFrames - delay); if (scrollbar != null) scrollbar.repaint(); } }