For producing flexible memory materials with controlled memory characteristics, functional copolynaphthalimides (co-PNIs), with varied composition of 1,4,5,8-naphthalenetetracarboxylic dianhydride (NTDA), 4,4'-(9-fluorenylidene) dianiline (BAPF) and 4, 4'-diaminotriphenylamine (DATPA), were designed and synthesized in this work. Optical and electrochemical measurements on the synthesized co-PNIs, denoted as co-PNI-TPAx (where x = 0, 1, 2, 5, 10 for the molar ratio of the DATPA-containing unit in the co-PNIs), indicate gradually enhanced HOMO and continually degraded band gap with increasing DATPA unit, as further approved by molecular simulation. What is more, electrical characterization on the ITO vertical bar thinco-PNI active layer vertical bar Al sandwich devices witnesses a wide alteration of the memory behaviors from no electrical bistability (NULL, co-PNI-TPA0 and co-PNI-TPA1), to static random access memory (SRAM, co-PNI-TPA2 and co-PNI-TPA5), and then to the write-once read-many times memory (WORM, co-PNI-TPA10), implying the significance of composition control on determining the memory characteristics. Mechanisms associated with the switching effect and the charge transfer in the co-PNIs were analyzed based on the optical, electrochemical results and the B3LY13/6-31G(d) calculations. The conversion of the memory effect from NULL, to volatile SRAM, and then to nonvolatile WORM is suggested to result from the gradually increased ability of the synthesized co-PNIs to form stable charge transfer complexes with the increased electron-donating DATPA species. The fine memory tuning achieved here reveals the particular availability of the copolymerization strategy in designing functional polyimides with controlled performances for practical memory applications. (C) 2014 Elsevier Ltd. All rights reserved.