I have a question about how to incorporate a variable in a certain line of code inside a function. Here goes :
function menu(new_document) {
document = new document
… some other code
_root.document._visible = 0;
}
In this case, I want to use the string value of the variable “document” and render it invisible. I am sure that the syntax that I used is wrong. I did verify that the the function recognize the value of “new_document” by using “Trace” and it does.
dot syntax uses object references to reach an object or property. If you are using strings, you need to use associative array referencing, meaning using [string] instead of .object
ex: