Hi,

Anyway, perhaps you can try something like so
PHP Code:
button.onPress = function()
{
    if (
_currentframe == 1)
    {
        
play();
    }
    else if (
_currentframe == _totalframes)
    {
        
gotoAndStop(1);
    }
}; 
effectively it disables the button until its either on frame 1 or the last frame