11 Replies Latest reply on Jul 18, 2006 9:45 AM by wgb14

    Another MIAW problem

    wgb14
      Hi all,

      I wonder if you can help me with another MIAW problem that i runned into. I want to create a custom-shape MIAW window that runs upon the opening of my director movie. I am trying to apply a mask on my window by using the following code

      global mymovie

      on prepareMovie

      set mask = "Surf"
      mymovie = window().new("MIAW_test")
      mymovie.fileName = "MIAW"
      set window("MIAW").appearanceOptions.mask = mas --- mas is the 1 bit mask that i want to apply to my window
      set horizOffset to 360
      set vertOffset to 220
      set windowSize to the drawRect of mymovie --- sets the window size to the size of the movie
      set newRect to offset(windowSize, horizOffset, vertOffset)
      set the rect of mymovie to newRect
      mymovie.open() -- Opens the window

      end

      The code is not working and i have no idea what is wrong with it. I have tried to change several of the properties of my MIAW, but none of them seems to work. For example, another script that i tried to change the type of the window is:

      global mymovie

      on prepareMovie

      set mask = "Surf"
      mymovie = window().new("MIAW_test")
      mymovie.fileName = "MIAW"
      window("MIAW").type = #tool
      set horizOffset to 360
      set vertOffset to 220
      set windowSize to the drawRect of mymovie --- sets the window size to the size of the movie
      set newRect to offset(windowSize, horizOffset, vertOffset)
      set the rect of mymovie to newRect
      mymovie.open() -- Opens the window

      Again the above script is not working. Also most of the examples that i tried from the adobe site are nto working either with the version of director i am using MX 2004 10.1.

      Finally, i would like to ask if you can suggest me any MIAW Xtra for MX 2004 10.1 that will allow me to manipulate the properties of MIAW easily without having to go through the hasle of lingo.

      Many thanks
        • 1. Re: Another MIAW problem
          Level 7
          > I wonder if you can help me with another MIAW problem that i runned into. I
          > want to create a custom-shape MIAW window that runs upon the opening of my
          > director movie. I am trying to apply a mask on my window by using the following
          > code
          >
          > global mymovie
          >
          > on prepareMovie
          >
          > set mask = "Surf"
          > mymovie = window().new("MIAW_test") mymovie.fileName = the moviepath &
          > "MIAW_test"
          > set window("MIAW_test").appearanceOptions.mask = mask
          > set horizOffset to 360
          > set vertOffset to 220
          > set windowSize to the drawRect of mymovie --- sets the window size to the
          > size of the movie
          > set newRect to offset(windowSize, horizOffset, vertOffset)
          > set the rect of mymovie to newRect
          > mymovie.open() -- Opens the window
          >
          > end
          >
          > The code is not working and i have no idea what is wrong with it.

          Perhaps you should define what you mean by "not working" - do you mean
          no window opens, or that it doesn't look like you intended?
          Did you test it as/from a projector?
          • 2. Re: Another MIAW problem
            wgb14 Level 1
            Hi

            <<that it doesn't look like you intended>>

            Thats what i mean by "not working". No i haven't tried it yet on a projector, do you believe that it will make any difference? Did you find any errors in the code?

            Many thanks
            • 3. Re: Another MIAW problem
              Level 7
              > Thats what i mean by "not working". No i haven't tried it yet on a projector,
              > do you believe that it will make any difference?

              Where MIAWs are concerned it's always best to test from a projector as
              they often behave or appear differently. This is where a fast-start stub
              projector becomes very useful.

              > Did you find any errors in the code?

              It appears fine (though your syntax could perhaps do with updating)
              except for line wrapping - which I assume is caused by the web interface
              or my newsreader. The only (other) thing I'd suggest is supplying a
              member reference instead of a string for your window.mask property. That is:
              mask = member("mask")
              • 4. Re: Another MIAW problem
                wgb14 Level 1
                It is really driving me crazy... it is the first time that i am working with these MIAW and i am having very hard time to deal with them. Apparently, except from some basic properties (e.g., title and location) my window refuses to accept any other parameters (e.g., type of mask). Any ideas please help!!!
                • 5. Re: Another MIAW problem
                  Level 7
                  Try setting the mask and various other appearanceOptions you want in the
                  MIAW file itself via the Display Template tab of the PI and save the
                  file. Then you don't need to set these things using lingo prior to
                  opening the window.
                  • 6. Re: Another MIAW problem
                    wgb14 Level 1
                    Hi

                    thanks for your answer. Indeed, i can set most of the wanted properties for my MIAW file from the display template. However, i am really curious why my lingo code can not set these properties on runtime. Can you find any errors?

                    Thanks
                    • 7. Re: Another MIAW problem
                      Level 7
                      > Can you find any errors?

                      No, I can't, but since you were complaining about the hassle of using
                      Lingo I thought I'd offer the no-lingo alternative, at least until you
                      get the appearance functioning properly.

                      You need to test this as a projector.
                      • 8. Re: Another MIAW problem
                        wgb14 Level 1
                        Unfortunately the code is not working neither in the projector. In any way, i found the anyshape xtra to work with and i will bypass the use of lingo for my MIAW needs.

                        Many thanks for your help
                        • 9. Re: Another MIAW problem
                          wgb14 Level 1
                          Hi again

                          Unfortunately, it is rather impossible to get what i want even with the xtra (Anyshape xtra) that i am using - the quality of the mask is very low. May i ask if anyone knowns how to create a MIAW with a custom appearence, that is a custom title bar and custom background with a round border (i.e., in the edges of the window) using Lingo?

                          Many thanks
                          • 10. Re: Another MIAW problem
                            Level 7
                            It looks like you are setting the mask of the new movie to a cast member
                            in the startup movie. If this is true, then it won't work. You can't
                            assign a cast member from one movie's internal cast to another movie.
                            The cast must be external and shared by both movies for that member to
                            be in scope of both movies.

                            --
                            Rob
                            _______
                            Rob Dillon
                            Adobe Community Expert
                            http://www.ddg-designs.com
                            412-243-9119

                            http://www.macromedia.com/software/trial/
                            • 11. Another MIAW problem
                              wgb14 Level 1
                              For anyone that is interested to know, a good xtra for changing the shape of the window is the anyshape xtra. Then the wanted MIAW properties (e.g., title bar, etc) can be adjusted from the MIAW iteself.

                              Many thanks for all your suggestions