Adobe Animate Dynamic Text Box not updating problem

Hi, I’m from an actionscript background and only just getting to grips with Animate with HTML5 Canvas.
I’m creating a simple maths quiz and having a problem displaying the updated score inside a dynamic text box.
I know the score variable is adding +1 (I’m using alert(score) to test this) but it isn’t updating inside the dynamic text box (named countText in the properties panel).
Any pointers in the right direction would be appreciated.

Example code:

// check the question count
function scoreCheck() {
score++;
alert(score);
this.countText = score; // this textfeld is not updating
}

Can you share your full HTML, CSS, and JS? I’d like to see how the JS and text box in the HTML are connected.