Dynamic text update problem
I am making a menu, with lots of submenus using HTML5 Canvas in Animate CC.
I am running into a weird problem.
I have simplified the problem as much as I could into this fla:
Broken Example.fla - Google Drive
What you'll see in that fla is this:
- A single frame in the JS layer that has code
- A second frame with a single, dynamic text box that has the instance name txtBoxOne
- A third frame with 2 dynamic text boxes, with instance names txtBoxTwo and txtBoxThree
The javascript starts running a function in the background that updates these text boxes, if they exist as properties of the exportRoot object.
What I expect to see when I run this in a browser is this:
- It skips to frame 3
- The text in txtBoxTwo changes from "2" to "txtBoxTwo" within a few seconds
- The text in txtBoxThree changes from "3" to "txtBoxThree" within a few seconds
What I see is this:
- It skips to frame 3
- The text in txtBoxTwo changes from "2" to "txtBoxTwo" within a few seconds
- The text in txtBoxThree changes from "3" to "txtBoxOne" within a few seconds
If I remove the second frame however, everything works as expected.
Why does this happen? What am I doing wrong?
