Copy link to clipboard
Copied
I have some text to return to my Canvas after an Ajax lookup, and wondering how to create a dynamic text element and set and read its value within the HTML5 canvas? Have tried... but to no avail.
Thanks,
Geoff
Copy link to clipboard
Copied
.
Copy link to clipboard
Copied
Just name it, then assign whatever you want to its text property.
this.myDynamicTextfield.text = "I am the very model of a modern major general.";
https://createjs.com/docs/easeljs/classes/Text.html
Copy link to clipboard
Copied
Thanks, but as far as I can see I have done exactly that. I have a 1 frame Timeline. On the canvas I have a dynamic text element with the instance name "myDynText" ( Arial, bold, 20pt, colour purple).
In my frame script is:
this.myDynText.text = "Processing... please hang on...";
But nothing appears on the canvas when testing. No errors appear on the Output.
Can you suggest what might be wrong?
Geoff
Copy link to clipboard
Copied
I have found the issue was with some other code in my test. Thanks for your help.
Geoff