Hi,
I am using this script to have a stub projector open a movie ('movie')
and stretch it to the width of the current desktop and adjust the
hight accordingly. This avoids the movie being knocked out of
proportion by keeping teh width to height ratio the same. The integer
and floats are used because in order to get the best rpecision you
want to use decimal points, but when it comes to setting actual pixel
values that can only be done with integers.
***************************
-- find new MIAW width
tDTWidth = integer(the desktopRectList[1][3])
tDTHeight = integer(the desktopRectList[1][4])
-- create new window
window().new ("movie")
window("movie").filename = "movie"
-- resize new MIAW
tMIAWwidth = window("movie").rect[3] - window("movie").rect[1]
tMIAWheigth = window("movie").rect[4] - window("movie").rect[2]
tHeightFactor = float(tDTWidth)/float(tMIAWwidth)
tNewHeight = integer(tMIAWheigth * tHeightFactor)
tNewTop = integer((tDTHeight - tNewHeight)/2)
tNewBottom = tNewTop + tNewHeight
window("movie").rect = rect(0, tNewTop, tDTWidth, tNewBottom)
window("movie").drawrect = rect(0, 0, tDTWidth, tNewHeight)
window("movie").resizable = false
window("movie").titlebarOptions.visible = false
window("movie").open()
*************************************
Nik C
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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!]