The stage's rect is a special case. Director apparently doesn't let you set
it's coordinates individually. This is probably because Director makes a
separate copy of certain items before it operates on them. For example, you
can't set one point in a vector vertex list, you need to update the entire
vertex list or use a function to do it. For your case, you can use a
temporary rect variable to make the change, such as:

newRect = (the stage).rect
newRect.left = newRect.left + 100
(the stage).rect = newRect

Here is a longer version showing the interim steps:

put (the stage).rect
-- rect(344, 129, 656, 471)

put (the stage).rect
-- rect(244, 129, 656, 471)

newRect = (the stage).rect

put newRect
-- rect(244, 129, 656, 471)

newRect.left = newRect.left + 100

put newRect
-- rect(344, 129, 656, 471)

(the stage).rect = newRect

put (the stage).rect
-- rect(344, 129, 656, 471)

There are also a number of commands, such as "offset" that you can use to
shift a rectangle in a more efficient manner. Refer to Chapter 6 of LiaN
and Chapter 5 of DiaN among others.

Regards,
Bruce

At 10:43 PM -0400 09/20/00, <[EMAIL PROTECTED]> wrote
>Subject: <lingo-l> rects
>
>hi lingoists,
>
>why the heck can't i manipulate the rect of the stage this way?
>
>setaProp(the rect of the stage,#left,getaProp(the rect of the stage,#left)
>+ 100)
>or
>setAt(the rect of the stage,1,getAt(the rect of the stage,1) + 100)
>it always returns an unaltered rect.
>
>the only way i've found is to change all the values, like this:
>the stage.rect = rect(34,200,50, 9)
>set the rect of the stage = rect(100,200,3, 94)
>the stage.rect = rect(100,200,3, 94)
>
>if i create a list:
>test = [1,1,1,1]
>and then
>setAt(test,2,getAt(test,2) + 99)
>it returns
>test = [1,100,1,1]
>
>why doesn't it work with rect lists? how can i change each rect list
>property (#left,#top,#right,#bottom) individually? i've searched in
>director in a nutshell, and it's said that it should work. any idea?
>regards,



Bruce Epstein, Zeus Productions, [EMAIL PROTECTED], 732-940-2800
Check out LAST CALL - The Ultimate Bartending Sim:
http://www.zeusprod.com/games/lastcall.html
--------
Director and Lingo in a Nutshell (DiaN/LiaN) kick butt.
Free Sample Chapters: http://www.zeusprod.com/nutshell/downloads/
--------



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to