Timeline Scrubber(calculate total frames with more than one scene)

Hi guys, I need help on how to build a timeline scrubber that can scrub more than one scene.

  1. Scene 1 had 20 frames
  2. Scene 2 had 20 frames
  3. On scene 1 I put the slider that scrub the timeline. The totalFrames; sum all the frame from all the scene.
  4. When i scrub the slider to frame 21 error occurred saying that the slider couldn’t be found. So i paste the slider in scene 2.

So how to continue scrub on scene 2? How to make a slider that can scrub all scene and move along showing the current frames?