By using drug-encapsulating nanoparticles as the basis for electrostatic assembly, it is possible to generate highly functional films that do double duty. These adaptable thin films can be used both for releasing the drug in a controlled fashion and for biological imaging.