You can’t put this code in a Text Display object, it has to go into a matrix object. In fact, there must be something else wrong because code you put in a Text Display object in a matrix generally won’t execute at all.
In any case, the matrixbutton statement is obsolete – I wouldn’t use it in anything new. I think what you want is the info(“matrixclickedobjectid”), then you can use the objectinfo( function to get the rectangle.
so I can move another object to that rectangle location
I’m really wondering what you mean by this. It doesn’t sound like something you really want to do in most cases, because the position of a matrix cell is usually not fixed.
I’m working on the HTML documentation for Text List and Matrix objects right now. In the meantime, I know that you (@goMiddleton) have access to the videos, so I would recommend that you review the section of the Matrix class on Matrix Click Information, or at least look at the PDF of the slides. It’s about 1/3rd of the way thru Matrixes.pdf