Categories and Million Dollar Question Games
July 8, 2009 12:00 AM
I'm not sure how "elegant" this is, but these are the steps I took to retrieve a percentage score from the categories game allowing me to use is as a true "test".
- I created a variable to get the Score from the game and allow me to mathematically transform it. For arguement's sake "gameNumCorrect"
- I created a variable to hold a "question constant" as I'm calling it. I populate that constant with the total numberof questions in the current Categrories game.
- I created an action on the page that gets the "score" variable from the flash object and moves it into "gameNumCorrect".
- I then created an action group called "Percent" It consists of several actions.
- The first action moves gameNumCorrect into a working varable called "work"
- The next action divides the work variable by the game constant.
- The next action multiplies the work variable times 100.
- The next variable populates a text box with the contents of the work variable
- The Textbox can be updated by any activity supported by lectora simply by calling the "Percent" action group.
I hope that all makes sense.
prumike said:Do either of the games have a variable associated that can report out a win or loss of a game? TYIA
Discussions have been disabled for this post