This content has been marked as final.
Show 2 replies
-
1. Start a projector on second monitor
duckets Nov 16, 2006 2:00 AM (in response to McMaster05)Yes, although I don't think there's a setting to do it in the Director user interface, it has to be done with lingo in the startMovie handler.
If there's a second monitor attached, there will be a second 'rect' in _system.desktopRectList. To get it, use something like this.
secondMonitor = _system.desktopRectList[2]
'secondMonitor ' will now contain a rect which describes the pixel coordinates of the second monitor. You can then simply set the stage rect to this value, if you want the stage to fill the second monitor, like this:
--------------------------------------------------
on startMovie
secondMonitor = _system.desktopRectList[2]
_movie.stage.rect = secondMonitor
end
--------------------------------------------------
Or, if you want to keep your original stage size, but centre it in the second monitor, you'll need to do a few calculations, like this:
--------------------------------------------------
on startMovie
secondMonitor = _system.desktopRectList[2]
halfWidth = _movie.stage.sourceRect.width/2
halfHeight = _movie.stage.sourceRect.height/2
posLeft = secondMonitor.width-halfWidth
posTop = secondMonitor.height-halfheight
newRect = rect(posLeft,posTop,posLeft,posTop) + _movie.stage.sourceRect
_movie.stage.rect = newRect
end
--------------------------------------------------
hope this helps!
- Ben -
2. Re: Start a projector on second monitor
McMaster05 Nov 16, 2006 11:06 AM (in response to McMaster05)Thanks Ben,
you perfectly directed me in the correct Direction.
It took some time until I realised, that I had to put it in a Moviescript, but now it works like a charm:
on startMovie
preloadmember
myresult = the result
if (the deskTopRectList).count="2" then
moni_1 = (the deskTopRectList)[1]
moni_2 = (the deskTopRectList)[2]
moni_1_res = [(moni_1.width), (moni_1.height)]
moni_2_res = [(moni_2.width), (moni_2.height)]
if (moni_1_res = moni_2_res) then
(the stage).rect = (the deskTopRectList)[2]
else if (moni_1_res=[1600,1200]) then
(the stage).rect = (the deskTopRectList)[1]
else if (moni_2_res=[1600,1200]) then
(the stage).rect = (the deskTopRectList)[2]
else
end if
else
(the stage).rect = (the deskTopRectList)[2]
end if
directToStage = TRUE
end

