Skip to main content
September 30, 2013
Question

Create an Undo button

  • September 30, 2013
  • 2 replies
  • 618 views

I just want the slide to go back one step and not a whole page. Is it possible to create a back button that only goes back one action at a time? My thinking was this might be performed by an undo action using javascript but cannot find a suitable script.

Can anyone help or is this asking the impossible?

This topic has been closed for replies.

2 replies

Lilybiri
Legend
September 30, 2013

Some examples of what Rod explained in this blog post: http://blog.lilybiri.com/micro-navigation-in-adobe-captivate

Lilybiri

RodWard
Community Expert
Community Expert
September 30, 2013

Something like this is possible in Captivate but it requires that you capture the frame number at given points and record this frame number in custom user variables. 

There is a system variable called cpInfoCurrentFrame that contains the actual number of the movie frame at a given point at runtime. But since Captivate is event-driven, it means that you can only capture this frame number when some specific event occurs.   For example, you can capture the frame number at the beginning of a slide using the On Enter Slide event. You can similarly use the ON Success or On Last Attempt actions of an interactive object (e.g. button, click box, TEB, or widget) to capture frame number.  You need to set up Advanced Actions that are triggered by these events to assign the value at that moment of the cpInfoCurrentFrame system variable as the value of a user variable.

Once you have various frame numbers stored in different user variables (you can only store one value in each variable) then you can use these as a way of jumping back along the timeline.  Having one level of undo is not that difficult because it only involves one single user variable to jump back one step.  However having more than one level might be tricky. Just because you jump backward a number of frames, this will not automatically make everything in your project revert to a previous condition.  If you are currently using variables and Advanced Actions to create sophisticated user interactivity, then it could be much more complex to manage your UNDO condition properly.