One example is Austin Powers in Goldmember (2002):
In a self-parody of the Austin Powers series, there
is a film within the film in the opening. Austin
Powers is featured in a bio-pic called Austinpussy (a parody of the James Bond film Octopussy) directed by Steven Spielberg and starring Tom Cruise as Austin Powers, Gwyneth Paltrow as Dixie Normous, Kevin Spacey as Dr. Evil, Danny DeVito as Mini-Me, and John Travolta as Goldmember.
And at the end:
The heroes arrest Goldmember, who turns
to the camera to reveal the entire string of events was adapted into a film by Steven Spielberg, starring Tom Cruise as Austin, Kevin Spacey as Dr. Evil, Danny DeVito as Mini-Me, and John Travolta as Goldmember. Austin, Foxxy, Dr. Evil, Mini-Me and
Nigel are in the audience of a Hollywood theater
watching the film.
You may also be thinking of Scream 2 and 3 (1997 and 2000), which although weren't examples of a film-within-a-film-within-a-film, each had a film-within-a-film:
In the latter two films of the Scream horror trilogy, a film-within-a-film format is used when the
events of the first film spawn their own horror
trilogy within the films themselves. In Scream 2, characters get killed while watching a film version
of the events in the first Scream film, while in Scream 3 the actors playing the trilogy's characters end up getting killed, much in the
same way as the characters they are playing on