This content has been marked as final. Show 3 replies
is equivalent to:
var key:String = "ENGLISH";
You can only dot to a literal property name. If you need to reference the property with a variable, you must use bracket notation.
Hi Tracy, thanks very much for addressing this. You reply has allowed me to make some progress (remember you are dealing with a newbie here, I am just getting to the point where I am looking at the AS 3 forum) on this square brackets business – I have seen them used, but this is the first time I see any specific info on what is probably only one of many uses for them.
So, now the code works, but not as expected: I have to click the button twice to see the results and, to ‘clear all’, I have to also click ‘getStructRemoteObject’ before I see results. So, if you have time, I would appreciate at least a hint of what is going on.
If you want to try it, go here:
The original sample app:
Source view is enabled.