Specifications

142
USING CAPTIVATE
Widgets
Last updated 9/28/2011
getSlideProps() Returns the properties of the slide containing the widget. The returned object has the following
members.
slideType Returns one of the following: Normal Slide, Question Slide, or Random Question Slide.
slideHandle Handle to the slide functions. slideHandle supports the following functions: AddNoSkipFrame,
startFrame, and endFrame.
AddNoSkipFrame(frameNum:Number): No frame is skipped at runtime. frameNum refers to the frame number with
respect to the slide indexed from 1.
The Adobe Captivate SWF uses a functionality called “pacemaker” at runtime. When there are insufficient system
resources, the pacemaker skips frames in a way that the user does not notice any glitch in the movie. However, it is
possible that a frame containing actions might get skipped in the process.
AddNoSkipFrame is used to ensure that
pacemaker does not skip the specified frame.
startFrame returns the frame number at which the slide begins. The indexing begins with zero.
endFrame returns the frame number at which the slide ends. Indexing begins with 0.
getMovieProps Returns the properties of the Adobe Captivate movie that is closest to the hierarchy of the widget. The
returned object has the following members:
contentWidth Width of the movie's content.
contentHeight Height of the movie’s content.
variablesHandle Some Adobe Captivate System variables are accessed from here. For example,
movieHandle.GetMovieProps().varaiblesHandle.myVar = 10;
movieHandle <deprecated> Handle to the main movie object(rdMovie) in captivate runtime. Only some Adobe
Captivate system variables are available here.
IsWidgetVisible Returns if the widget is currently visible on stage.
isWidgetEnabled Returns whether the widget is enabled. A widget is considered as enabled when it is present on the
slide or on the Timeline. All functions discussed work only if
isWidgetEnabled() returns true.
Guidelines for using movieHandle in widgets
The value of movieHandle must be updated by the widget whenever cpSetValue('movieHandle', val) is called.
When it is called multiple times, the value might not be the same every time. The variables must be updated for every call.
GetSlideProps and GetMovieProps consume a lot of memory resources. So, use these calls sparingly. Best practice
is to cache the return value to a variable and use the variable. Refer to the following example.