Question Widgets - Adobe CAPTIVATE 5 Help Manual

Table of Contents

Advertisement

Last updated 4/22/2010
var slideProps:Object;
var movieHandle:Object;
function
cpSetValue( variable:String , val ) {
if ( variable == 'movieHandle' ) {
movieHandle = val;
}
}
function onWidgetEnabled(){
slideProps =
movieHandle.GetSlideProps();
}
function myWidgetFunction (){
if(slideProps.slideType == "Question Slide" ) {
myLabel.Text = "" ;
}
}
Ensure that operations are carried out during Adobe Captivate runtime only when the widget is enabled. Operations
on
(particularly
movieHandle

Question widgets

Question widgets should implement the following functions in addition to the functions discussed in this topic.
This method is called when the user clicks Submit on the question slide. The method
getWidgetQuestionState()
provides the widget with an option to restore its state when the quiz is restored in an LMS. This function should return
a non-empty string in a way that it can restore its state when the widget is reloaded.
Restores the widget to its previous state.
setWidgetQuestionState()
widget is reloaded in the LMS.
function getWidgetQuestionState()
{
trace("get Widget Question State");
return "<var1>"+var1+"</var1><var2>"+var2+"</var2>"
//Should be a non- empty String.Should not contain _ and
}
function setWidgetQuestionState( val:String)
{
trace("set Widget Question State()" +
}
For example, let us consider that the state of the variables is var1=10, var2="Captivate" when Submit is pressed and the
function is called. Open the Adobe Captivate quiz in LMS, attempt the question, and press Submit. The
function is called. Re-open the quiz in LMS. When the widget question is shown, function
getWidgetQuestionState
is called with the same string: "<var1>10</var1><var2>Captivate</var2>"
setWidgetQuestion
Displays the review feedback. The function returns an array of
answers()
A unique ID for every answer.
answerID
String representing the answer chosen by the learner.
chosenAnswer
String representing the correct answer.
correctAnswer
For example,
DRAFT
) when the widget is not enabled might lead to unexpected results.
variablesHandle
val
setWidgetQuestionState()
;
);
with the following properties.
Objects()
128
USING ADOBE CAPTIVATE 5
Widgets
is called when the

Advertisement

Table of Contents
loading

Table of Contents