Pages Navigation Menu

Awesome eLearning Templates and eLearning Custom Development

Passing Scores from Flash Games to Lectora

Are you using our flash eLearning games in Lectora? Do you want to pass the score to Lectora?

Let me show you how you can pass a flash game score to Lectora and then display it in a text box. (Note: This tutorial works for flash actionscript 2 only.)

Access the Demo Files – Here are links to the files I used in the demo:

Steps in Lectora

  1. Add a new variable in the variable manager. (I called mine FlashScore)
  2. Add a page (Page 1) with the flash game .swf file.
  3. Copy your next button and place it on Page 1. Put an action on it to go to the next page when clicked. (On: Mouse Click / Action: Go To / Target: Next Page)
  4. Add an action to the next button on Page 1.. (On: Mouse Click / Action: Flash Command / Target: The name of your .swf file / Command: Get Variable / Name: LectoraScore Variable: FlashScore)
  5. Create Page 2 and put a text box on it. (This box will display your game score. I called my box scoreBox)
  6. Create an action on Page 2. (On: Show / Action: Change Contents / Target: scoreBox / New Contents: FlashScore)

Steps in the Flash Game .fla file (Actionscript 2 ONLY)

  1. On the first frame in the actions layer, add: var LectoraScore:Number=0
  2. Click into the Interaction movieclip, actions layer, first keyframe and find the sendScoreToSCORM function. Add this line of code in the function: _parent.LectoraScore = score;
  3. Publish the .swf file and insert it into your Lectora course.

 

So…what creative things could you do with this information?

You could actually have Lectora display different text messages in the course based on the user’s game score.

  • If they scored low you could show text that describes how to go back and review information.
  • If they scored really high you could have a hyperlink appear that let’s them skip past basic information in the course and go directly to the “meat”.

You could also let them email their results to a manager or let them print a certificate showing the results.

Want to build flash buttons to navigate within your Captivate file? Here is a great resource.

3 Comments

  1. This worked great. Thanks for the article. So it can’t be done with the AS3 version? That’s a shame.

  2. Can Lectora send information back to flash as well in conjunction Flash AS2?

  3. Hi Nicolas, in theory… yes. However, I’m not sure I’ve seen it done before.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

elearning_template