Spider and Fly

A spider lived in a room that measured 28 feet long by 8 feet wide by 8 feet high. One day, the spider spied an incapacitated y across the room, and of course wanted to crawl to it as quickly as possible. The spider was on an end wall, one foot from the ceiling and four feet from each of the long walls. The fly was stuck one foot from the floor on the opposite wall, also midway between the two long walls. Knowing some geometry, the spider cleverly took the shortest possible route to the fly and ate it for lunch, after crawling only 34 feet. What was its path?

Spider and Fly