Not sure why you marked a bug/feature request as correct since Captivate supplies the variable through the Common JS Interface.
If you declare cp in a global scope you would not need to repopulate it. You need to do it in every function because that is where you are declaring it, so it is scoped to that function.
If you look more closelly you can see I dit use it as a global, but somehow it dit not stick.
maybe I should have used: window.cp to get it, but I'm moving forward now.
I was allready looking into the Common JS Interface and how to get the variables without external coding ;-)
if(window.cpAPIInterface)
{
if(window.cpAPIEventEmitter)
{
window.cpAPIEventEmitter.addEventListener("CPAPI_QUESTIONSUBMIT",function(e)
{
window.cpAPIInterface.setVariableValue("currentAttempt",e.Data.questionAttempts);
});
}
}
This does work from within captivate but unfortunatelly the variables in a retryfield do not update durring a question in flash mode, so it only works properly with html5.