I am having trouble getting a function to reference a movie clip on the stage (thatsRight
). I can reference it outside of a function to initially set it visible = false
and inside the this.Correct
function to visible = true, but calling another function this.removeAndCheck
can not reference the same movie clip on the stage. I get the error
"TypeError: undefined is not an object (evaluating 'this.thatsRight.visible = false')"
on the line in the this.removeAndCheck function. This doesn't make sense to me. One function can reference the movie clip but another can not. This code is on frame.
this.thatsRight.visible = false;
this.Correct = function() {
this.thatsRight.visible = true;
setTimeout(this.removeAndCheck, 3000)
}
this.removeAndCheck = function() {
this.thatsRight.visible = false;
this.CheckAllCorrect();
}
I am also have issue with this.CheckAllCorrect() being called. this.CheckAllCorrect()
is also on from one but on another action layer.
This is part of a conversion of different as3 flash assets to html5 canvas assets using adobe animate CC. Any help with this would be greatly appreciated.