HTML5 Canvas JS: Store Path to Dynamic text as Variable?
Writing this out every time for the numerous click functions I have seems a bit redundant:
exportRoot.TXT_add.text = "Some Value";
exportRoot.TXT_ext.text = "Another Value";
This would be tidier:
ADDR = "Some Value";
EXT = "Another Value";
There must be some way to do this, but I can't find anything on the topic.
This is my attempt:
var ADDR = exportRoot.TXT_add.text;
var EXT = exportRoot.TXT_ext.text;
clear_INFO=function(){
ADDR = " ";
EXT = " ";
}
clear_INFO();
That should clear the content of the Dynamic text objects, but it does nothing. And it also does not produce a console error, shouldn't it?
Is this sort of thing simply not possible? Looking for clues, thanks.
