1 Reply Latest reply on May 14, 2006 8:40 PM by Newsgroup_User

    Centering MIAWS

      Hello everyone. I was hoping somebody might be able to help me out with this problem.

      I have a director program which has two miaws involved within it. i.e. When in the projector file, you click a button and a miaw appears (you can then close the miaw to go back to the initial file). I want the program to be displayed centrally on the users screen, and when the miaw appears, it appears directly ontop of the first file, hiding it.

      This works perfectly on my laptop. but as soon as I put the files onto a different resolution computer, the initial program stays centered, but the miaws jump over to the right a bit and down a bit.

      This happens even when I use the 'full screen' option on the projector settings. I have tried checking the center box on the main program display template, and the display template for the miaws., but for some reason, the check boxes on the miaws become unchecked the next time I open the files..... :S

      I hope somebody can make sense of what I have tried to describe and can give be a suggestion. All I need in short, is a way to center the miaws when the have been opened via a button on a projector file.

      Thanks for reading

      P.S. All 3 files are type document. I believe the problem comes for the center check box not staying ticked, thus it reverts to the location setting of 240 . 100

      Also, incase it makes much difference, I am using mx 2004
        • 1. Re: Centering MIAWS
          Level 7
          It's easy to reposition an miaw by altering it's rect. Here's some
          untesed code that should give you the idea

          openCentered the pathname & "displayOne", "WimdowA"

          on openCentered miawFilePath, miawName
          window(miawName).fileName = miawFilePath -- file atached, not opened
          R = window(miawName).rect -- read size of miawFilePath before opening
          -- alternative to reading live rec is to hard code it
          -- R = rect(0, 640, 480)
          D = the desktopRectList[1]
          hPos = (D.width - R.width) / 2 -- size of margin on one side
          vPos = (D.height - R.height) / 2
          window(miawName).rect = window(miawName).rect + rect(hPos, vPos,
          hPos, vPos) -- shift position with a bit of rect math
          open window(miawName) -- show it at centered pos