Captain Flinn and the pirate dinosaurs - Andreae, Giles, 1966- (Margaret K. McElderry Books, 2005)
When Flinn enters the classroom art closet for supplies, his imagination sends him on a high-seas adventure filled with pirates, dinosaurs, mystery, and swordfights.