First, you don't tell iTunes where a library is located by changing preferences. Preferences only tells iTunes where to store media from that point on. It won't reconnect to old media that way. Your library is also more than just media:
What are the iTunes library files? - http://support.apple.com/kb/HT1660
More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
Where are my iTunes files located? - http://support.apple.com/kb/ht1391
iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847
Second, using iTunes with an external drive means the external has to be on and fully mounted and awake before you start iTunes. If it isn't you have to resolve things in one of two ways depending upon what you have on the external drive. If you have just media you can quit iTunes, start the external, then resteart iTunes. If the whole library then resteart iTunes with the option key held down and guide it to the library file on the external.
Third, iTunes and NAS do not play well together. Something about the way NAS serves up the files and acts as a go-between the files and the iTunes application sometimes goes awry and is not easy to fix without rebuilding the library files (losing ratings, playcount, date added). Browse past posts about various issues arising. You're probably safest not splitting media and library files but keeping the whole lot on the external drive.