Conflicting If statements in For Loop

dont you also want to evaluate “_root.clouds”+i? So it would be this:

onClipEvent (enterFrame) {
    for (var i = 0; i<=31; i++) {
        if (this.hitTest(_root["clouds"+i])) {
            _root.sky.gotoAndStop("cloudy");
            cloudy = true;
            break;
        }
    }
    if (!cloudy) {
        _root.sky.gotoAndStop("sunny");
    }
    cloudy = false;
    //Close of For Loop
}