variable not working right
Hello, I am trying to write a variable in the middle of a command, like:
(in root, myvariable=12)
in another movie clip:
var movieclipnumber = _root.myvariable
_level2.this["othermovie"+movieclipnumber].gotoAndStop(5)
but flash keeps giving me the error:
"Expected a field name after '.' operator."
I am trying to get the logic to think:
_level2.othermovie12.gotoAndStop(5)
Is the syntax wrong? I think it's trying to consider "_root" in the variable "movieclip" as an actual path, where I just want it to be a reference for the variable "myMC", which happens to be in "_root". (I hope that wasnt too confusing!)
Thank you! :)