Forums > MaxMSP

Maxobj Properties rect?

January 25, 2006 | 6:54 pm

I am trying to dynamicly set the size of max objects.
I am using java script to look up a specifc object and
change its size. The js docs list the following:

Maxobj Properties
rect (Array, get/set)
The location of an object in a patcher. When the object’s rectangle is
changed, it will
move on screen if it is visible. The coordinates are stored in the
following order: left, top, right, bottom.

This sounds like what I want, but when I run the following code,
it does not modify the size or location of my object. Am I doing this
right?
Is rect the right property I should be using?

testobj.rect.left = 0;
testobj.rect.top = 0;
testobj.rect.right = 50;
testobj.rect.bottom = 50;

Anthony


January 25, 2006 | 7:15 pm

On 25 janv. 06, at 19:54, apalomba@austin.rr.com wrote:

> testobj.rect.left = 0;
> testobj.rect.top = 0;
> testobj.rect.right = 50;
> testobj.rect.bottom = 50;

Hi,

rect except an array. try this instead:

testobj.rect = [0, 0, 50, 50];

ej


January 25, 2006 | 7:50 pm

Ahhhh, i see. Thanks.

Anthony



f.e
January 26, 2006 | 9:10 am


Viewing 4 posts - 1 through 4 (of 4 total)