Monday, July 5, 2010

Load an Articulate Quizmaker Quiz into your Flash Object and Track Score

This is an update to a previous post in which I proposed a way for you to load a quizmaker quiz into your flash project and track the score. I have now worked on a second version of this that works with most browsers, as the original solution was only for IE 7+.

For the HTML part, simply use Articulates published html, and swap the name of the swf it is loading. (you will also need to change the width and height)

In your flash project, for the onLoadComplete of the quiz, you must set all these variables:


function onLoadComplete(mc:MovieClip)
{
mc.vHtmlContainer=_root.vHtmlContainer;
mc.vCaptureRC=_root.vCaptureRC;
mc.vUseFSCommand=_root.vUseFSCommand;
mc.vLMSPresent=_root.vLMSPresent;
mc.vAOSupport=_root.vAOSupport;
mc.vIE=_root.vIE;
mc.vResumeData=_root.vResumeData;
}


Basically these are all the initializing variables sent by the Javascript/HTML to the flash quiz to let it know if it's in an LMS and also what type of Browser is being used.

There is one small code change that I made to api.js, this was to get the solution working in IE6, For some reason the only way I could get scores tracking in my LMS on IE6 was to add an alert box to the DoOnClose function in quiz.js

function DoOnClose()
{
if (!g_bCloseExecuted)
{
if(IE6)
{
alert("");
}
g_bCloseExecuted = true;

if (g_bAOSupport)
{
PostResultsOnUnload()
}
}
}

5 comments:

  1. hi JD,

    Thanks for sharing your knowledge on your great post. One question about embedding QuizMaker file into Flash. When I try to embed the quiz.swf into my AS3, the output just loads the preloader but nothing else. The preloader spins but the quiz does not load. I tried moving the files around to different folders but to no avail.

    When I embed an Engage .swf it loads and plays fine in Flash. Only with QuizMaker .swf does it not load fully, not going beyond the spinning preloader.

    I checked the Articulate forums and it seems some folks are having the same issue and the Articulate folks cannot offer a solution.

    Any suggestions?

    Thanks in advance and keep up the great posts!

    - Andy

    ReplyDelete
  2. Andy can you email me your source?

    officeofirrelevance@gmail.com

    ReplyDelete
  3. Hi JD,

    I have to run published Articulate Quizmaker files in Lectora.

    Because Quizmaker publishes several files, HTML, .swf, .js for example, I am not sure how to do this.

    Wondering if you have done this with your Flash solution.

    Rick

    ReplyDelete
  4. Rick,

    I am always glad to help, i'll look into this matter. Can you send me the files your are working with right now?

    ReplyDelete
  5. Thanks JD,

    I sent to officeofirrelevance@gmail.com

    Rick

    ReplyDelete