Forum Discussion

CatherineG's avatar
CatherineG
Community Member
3 hours ago

Bingo Counter JavaScript Bug

Hi folks,

I'm creating a bingo activity where I want to let learners advance only once they've selected 5 (or more) of the bingo rectangles. I've used JavaScript to check if each of the toggled rectangles is set to true when a button is clicked and for the most part it seems to be working. (in the past I've had trouble trying to get a counter in storyline to accurately add and subtract based on states so JavaScript seemed more straightforward and reliable.)

However, it seems to get buggy and begins mis-counting if I select more than 24 of the rectangles. I'm not sure what is causing this and while that's well over what I learners will need to click, I don't want this bug to come back to bite me later (plus it could be fun to have a little reward for a blackout...)

If anyone is able to tell where I'm going wrong (or suggest a different solution), that would be incredibly appreciated! 

Thanks.

 

No RepliesBe the first to reply