var p_str:Number = 4; p_str_down.onRelease = function () { if (p_str>3) { p_str -= 1; } else { p_str = 3; } str.text = p_str; }; p_str_up.onRelease = function () { p_str += 1; str.text = p_str; };