Maxobj Properties rect?

Jan 25, 2006 at 6:54pm

Maxobj Properties rect?

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

#24101
Jan 25, 2006 at 7:15pm

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

#69243
Jan 25, 2006 at 7:50pm

Ahhhh, i see. Thanks.

Anthony

#69244
Jan 26, 2006 at 9:10am

#69245

You must be logged in to reply to this topic.