Nifty's moves are totally dependent on the price moves of its constituents!
The system automatically adjusts the Nifty spot value depending on the price fluctuations of the stocks in it!
So Nifty movement is dependent on the price move of its constituents as a whole ! Its possible and happens always that one stock in Nifty moves up and another goes down, the Nifty moves as per the cumulative effect of all 50 stocks movement and also we know that each stock has different weigtage in Nifty and its move will effect the Nifty move accordingly.
The non Nifty stocks can be affected due to moves in Nifty purely based on 'market sentiment' ! If a stock is near its resistance and Nifty moves up also, it may become a bit easier for the stock to breach the resistance .