Showing posts with label external swf. Show all posts
Showing posts with label external swf. Show all posts

Wednesday, March 24, 2010

Load an Articulate Quiz into your Flash Project

I recently completed work on a new flash based course. Basically the course is made up of several captivate demos and a final articulate quiz that are all loaded and navigated through a main flash portal / shell. This main swf file loads all the other swfs including that quiz.swf file that Articulate Quizmaker produces.

I also used the SCORM HTML and javascript that Articulate publishes when you choose publish for LMS. In my case I just swapped out the body of the quiz.html and embedded my own swf portal. This way when I load the quiz it will still have access to all the JS it uses when it's by it self right?

well yes and no.

It seems that if the quiz.swf doesn't get the flashvars it needs when it first loads up, it shuts off all tracking calls, boo-urns!

Well the trick here seems to be in the actionscript, this works for IE I have not tested for other browsers:

function onLoadComplete(mc:MovieClip)
{
/*assuming mc is the quiz.swf, initiating these variables will turn on tracking*/
mc.vHtmlContainer=true;
mc.vCaptureRC=false;
mc.vIE=true;
}

Enjoy! and if you have a better way feel free to contact me!