2 Replies Latest reply on Oct 26, 2006 2:15 PM by Newsgroup_User

    Positioning MIAWs in relation to the stage

    Opera Rat Level 1
      Does anyone know how I can get a third (or fourth) MIAW of the same movie to open slightly above and to the right of the second as the second is slightly above and to the right of the first. Here is the code that opens the first from the movie (glossary) playing on the stage which tells it where to open the first time (this script is fine. I'm just including it so you can see more of what's I've done).

      on hyperlinkClicked me, data

      aWindow = window().new("glossary")
      aWindow.filename = "glossary"
      tRect = aWindow.sourceRect
      aWindow.rect = aWindow.sourceRect.offset(100,465)
      aWindow.movie.sprite(3).member = aWindow.movie.member(data)
      aWindow.open()
      aWindow.moveToFront()
      end

      Below is the script that has the problem. When this script runs, the first window is already open because this script is within the MIAW. It correctly places the second window in the proper place, but then the third window opens on top of the second instead of above and to the side.


      on hyperlinkClicked me, data
      tName = "glossary2" && string(count(_player.windowList) + 1)
      aWindow = window().new(tName)
      aWindow.filename = "glossary"
      tRect = aWindow.sourceRect
      --get rect of original glossary window that was opened from the main movie
      gWindow = window("glossary")
      gRect = gWindow.rect.offset(50, -50)
      tRect = gRect
      aWindow.rect = tRect
      aWindow.movie.sprite(3).member = aWindow.movie.member(data)
      aWindow.open()
      end