[code]void FilmstripSlider::paint(Graphics& g)
{
if (filmStripImage.isValid())
{
float fval = (getValue() - getMinimum()) / (getMaximum() - getMinimum()) * (numFrames - 1);
int value = (int)fval;
int imageHeight;
int imageWidth;
if (getTextBoxPosition() == TextBoxBelow)
{
imageWidth = getWidth() - getTextBoxHeight();
imageHeight = getHeight() - getTextBoxHeight();
}
else
{
imageWidth = getWidth();
imageHeight = getHeight();
}
if(isHorizontal)
{
float intpart = 0.f;
float fractpart = modf(fval, &intpart);
g.setOpacity(1.0f - fractpart);
g.drawImage(filmStripImage, (getWidth() - imageWidth) * 0.5, 0, imageWidth, imageHeight,
value * frameWidth, 0, frameWidth, frameHeight);
g.setOpacity(fractpart);
g.drawImage(filmStripImage, (getWidth() - imageWidth) * 0.5, 0, imageWidth, imageHeight,
(value+1) * frameWidth, 0, frameWidth, frameHeight);
}
else
{
float intpart = 0.f;
float fractpart = modf(fval, &intpart);
g.setOpacity(1.0f - fractpart);
g.drawImage(filmStripImage, 0, 0, imageWidth, imageHeight,
0, value * frameHeight, frameWidth, frameHeight);
g.setOpacity(fractpart);
g.drawImage(filmStripImage, 0, 0, imageWidth, imageHeight,
0, (value+1) * frameHeight, frameWidth, frameHeight);
}
}
}[/code]
I would like to contribute a modification to the FilmStripSlider class posted above by Dave96
This will add motionblur to your frames rotation, works great using 32 frame tilesets. A little crude but it works 
About the modf()… you could value -= floor(value);