Active thin film devices