I've tried this several times... sometimes the recorded action works correctly. Other times, I can record the same exact sequence of steps and the action won't do the step(s) that reveal or hide layers prior to saving out png's and jpg's of the current state of the photoshop file.
For example, one action automates pasting an image into a smart object, flattening and saving the smart object which updates the photoshop file being worked on, and then saving out different framed versions of the smart object - Brown frame, no frame, black frame, etc - but instead of reproducing the recorded steps, it just outputs images that reflect the state of the file prior to the show/hide layer commands in the action.
Any idea how to work around this (I think) bug??