The Purple Rose of Cairo (1985)
The Purple Rose of Cairo is a 1985 American romantic fantasy comedy film written and directed by Woody Allen. Inspired by Sherlock, Jr., Hellzapoppin', and Pirandello's Six Characters in Search of an Author, it is the tale of a film character who leaves a fictional film of the same name and enters the real world.
More at Wikipedia.