Class extends OtherClass

use | constructors | public vars | constants | strings | comparisons | conversions | get/set

Use

sb = new MbScoreBar(numProbs);
sb.y = yy; sb.x = xx; addChild(sb);
.

.

.

private function handleNextProb(ev:MbEvent) {
sb.updateScoreBar(ev.res, p.cat);
if (sb.gameOver() == true) {
...
} else { ...

}

 

images are loaded automatically, but they must be in the library:

emptyImg, rightImg, wrongImg

get these from the sample file XmlTemplateStage

Constructors

MbScoreBar(n_:int)

Public Variables

     
     

Constants

type

static colGroups [0x000000, 0xDD5800, 0x990099, 0x990000, 0x6633ff, 0x000000]  
static colNames ["black", "orange", "purple", "red", "blue", "black"]  

Methods

updateScoreBar(res:String, nCol:int)

res can be MbEvent.RIGHT or MbEvent.WRONG

nCol is the number of the color group -- will be used as an index for colGroups

findOverallPercentCorrect():Number

doFinalFeedback():Array

returns final % correct

Getters/Setters/Checkers

gameOver():Boolean

checks for game over