Open/closed design principle

A while ago a friend and I were having a discussion about the use the private and protected access control attributes in AS3. While I stated that you should always try to write your code as open as possible as to make it flexible, he said that you should always make your code closed unless [...]