1 Reply Latest reply on Sep 13, 2006 8:20 PM by Newsgroup_User

    Opening MIAW in relation to stage

    Opera Rat Level 1
      I want to make sure that no matter what size monitor the movie is play on, everything will open in its proper place. I'm particulary concerned about these wide-screen monitors. Can anyone tell me if this is the correct way to make sure that the MIAW opens on any monitor and is set in relation to the stage. The stage centers itself in the monitor and requires that the monitor be set to 1024 X 768. (That is my first line of defense). This is the code I'm using:

      global w

      on exitFrame me
      window().new("fugue01").open()
      w = window "fugue01"
      d= window("stage").rect
      w.rect = rect(d.left + 150, d.top + 50, d.left + w.rect.width + 150, w.rect.height + d.top + 50)

      end

      Is this the same things as d=(the deskTopRectList)[1] ? On my monitor, both give me the same result. I haven't had the opportunity to test it on another monitor. I don't know why w is global. Someone is going to demo my work tomorrow and they haven't even tested on the laptop it will be shown on.
        • 1. Re: Opening MIAW in relation to stage
          Level 7
          > global w
          >
          > on exitFrame me
          > window().new("fugue01").open()
          > w = window "fugue01"
          > d= window("stage").rect
          > w.rect = rect(d.left + 150, d.top + 50, d.left + w.rect.width + 150,
          > w.rect.height + d.top + 50)
          >
          > end

          What you have written above should work.
          Your last line could also be shortened to:
          w.rect = w.sourceRect.offset(d.left, d.top)

          Be careful placing window references into global variables, or at least
          be aware that even if you #forget the window it is still in memory and
          running until you clear the global reference. forget() simply removes
          the reference from the windowList where it is placed automatically on
          creation.