This is a test site. Any changes will be lost!

Talk:Flash module: Difference between revisions

From MoodleDocs
Matt Bury (talk | contribs)
No edit summary
 
Matt Bury (talk | contribs)
No edit summary
Line 3: Line 3:
Looking at your code:
Looking at your code:


<nowiki>score = yourScoreVariable;
score = yourScoreVariable;
answers = yourAnswersVariable;
answers = yourAnswersVariable;


startTime = getTimer(); // start timer
startTime = getTimer();


_root.finishButton.onRelease = function() {
_root.finishButton.onRelease = function() {
     endTime = getTimer() - startTime;
     endTime = getTimer() - startTime;
     moodleService.send_response(answers, endTime, score);
     moodleService.send_response(answers, endTime, score);
     moodleService.cleanUp(); // goes to results page
     moodleService.cleanUp();
}
}


moodleService.init();</nowiki>
moodleService.init();


Could you tell us a bit more about this code?
Could you tell us a bit more about this code?

Revision as of 23:57, 13 January 2008

Hi, I'm new to Moodle but a fairly experienced ActionScript developer, both 20. and 3.0.

Looking at your code:

score = yourScoreVariable; answers = yourAnswersVariable;

startTime = getTimer();

_root.finishButton.onRelease = function() {

    endTime = getTimer() - startTime;
    moodleService.send_response(answers, endTime, score);
    moodleService.cleanUp();

}

moodleService.init();

Could you tell us a bit more about this code?