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
- Add a new variable in the variable manager. (I called mine FlashScore)
- Add a page (Page 1) with the flash game .swf file.
- 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)
- 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)
- Create Page 2 and put a text box on it. (This box will display your game score. I called my box scoreBox)
- 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)
- On the first frame in the actions layer, add: var LectoraScore:Number=0
- 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;
- 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.