visible in a function is not working
I am using Animate 21.0.9 - html canvas
I have an image that I am hiding at the beginning of the timeline using:
this.nextBtn.visible = false;
This hides the image with no issues.
I have a function that shows it:
function CheckComplete_btn()
{
if (ButtonVisited == 1)
{
console.log("TrackSequence Code Ran");
this.nextBtn.visible = true;
}
else
{
console.log("TrackSequence Code ELSE Ran");
}
}
When I click the button to run the function, I receive the following error code:
The function is running since I receive my console message, but the visible part is throwing an error.

If I take the line this.nextBtn.visible = true; out of the function, it works fine.
Any ideas?
Thanks
