6 Replies Latest reply on Jul 21, 2006 1:45 PM by wgb14

    How to select between different MIAW

    wgb14 Level 1
      Hi all,

      I have a main movie + three MIAW that load at different time frames. I want to allow my user to select the window that will receive his input. At the moment, one MIAW plays OK but when the second loads, the first is deactivated. I have buddy API xtra.

      Many thanks
        • 1. Re: How to select between different MIAW
          Level 7
          Check the docs for window.moveToFront() and try it first. If your
          desired window still doesn't have focus you could try Buddy API's
          baActivateWindow()
          • 2. Re: How to select between different MIAW
            wgb14 Level 1
            It will not work with neither of these methods. When the second MIAW is activated the first stops receiving any mouse actions (the user can't use any of its buttons). However, i can see that it is activated and it comes in the front of the first window. Any ideas what i am doing wrong?

            • 3. Re: How to select between different MIAW
              wgb14 Level 1
              This is the code that i am using to open my first window:

              on startmovie
              global mymovie
              global myScriptList
              global myClickCount


              mymovie = window().new("Control_Panel")
              mymovie.fileName = "Control Panel"

              mymovie.open() -- Opens the window

              -- remember the number of times clicked
              myClickCount = 0

              -- build list of scripts
              sText = member("scripts").text
              myScriptList = []
              repeat with j = 1 to sText.line.count
              myScriptList.append(sText.line[j])
              end repeat

              end if
              end


              global myScriptList,myClickCount,sounda,mymovie,dialogue

              On next

              -- grab the next script (or the last, depending)
              myClickCount = min(myClickCount + 1, count(myScriptList))

              if myClickCount <= 0 then
              -- do nothing
              else
              if myClickCount > 0 then

              textstr = the moviepath & myScriptList[myClickCount]
              textst = myScriptList[myClickCount]
              put textst into member "test"
              sprite(2).Hypertext ="\Load [file= ["&textstr&"]]"
              sprite(2).Hypertext = "\PlayScript [file= ["&textstr&"]]"
              end if

              -- If a location script is playing wait a few seconds and then activate the dialogue window
              if textst = "Navigation_Scripts\3.txt" then
              tell mymovie to go next
              set sounda = "Ritsos.ogg"
              dialogue = window().new("D_XML_Test (Greek2)")
              dialogue.filename = "path to file"
              t = timeout().new("mOpenWindow", 5000, #mOpenWindow, dialogue)

              end if
              end if
              end

              The next handler is called when the user clicks on the next button. The problem is that when the dialogue window opens the Control panel window can not receive any input. Any ideas on how to solve this?
              • 4. Re: How to select between different MIAW
                wgb14 Level 1
                Please help!!!! no matter what i do when the dialogue window opens the Control_panel window freezes (refuses to accept mouse down events). I have no idea what to do to fix this

                Thanks
                • 5. Re: How to select between different MIAW
                  Level 7
                  > Please help!!!! no matter what i do when the dialogue window opens the Control_panel window freezes (refuses to accept mouse down events). I have no idea what to do to fix this

                  What window.type are these MIAWs set to? The symptom you describe
                  /could/ be caused by #dialog-type windows - if so, try changing them to
                  #document or #tool
                  • 6. Re: How to select between different MIAW
                    wgb14 Level 1
                    Many thanks Sean!!! Your help is really valuable!!

                    Many thanks