set the stage size by lingo


[ Zettels Traum ] [ search / suche ]


>it doesn't appear that we can set the stage size on the fly...can anyone
>confirm this?

There are a few sneaky ways around this limitation.  A while ago, I was
looking for a way to change the stage size for director movies through
lingo in a batch process.  Someone on the list (I'm afraid I don't remember
who) said that you can open up .dir movies as MIAWs, Change the rect of the
window, and tell the movie to save itself.  the saved movie will have a new
stage size.

Unfortunately there is no way that i know of to change the rect of the
stage during runtime, but there is another trick that is almost as good.
For your main movie, use an empty movie that sets the visible of the stage
to false and opens up the "real" movie as a MIAW, thus creating a "fake
stage".  This movie can then resize itself by telling the stage (which is
invisible) to set its rect.  A handler for this might look something like
this:


on resizeStage newRect
        -- this handler goes in the movie script of the "fake stage" movie 
        tell the stage
                -- this assumes that there is only one window and it is
                -- the "fake stage"

           set fakeStage to getAt(the windowList, 1)
           set the rect of fakeStage to newRect
        end tell

        set the stageColor to the stageColor -- force a redraw of the fake stage

end




Dazu:























D. Plänitz