8 Replies Latest reply on Jun 2, 2009 8:15 PM by Sean_Wilson

    search text cast member in frame of a movie

    jcsp2001

      Hi guys.

       

      I have a MIAW in a movie that works as a TEXT Search tool for the movie.

       

      The movie has several text cast members located in different frames of the movie.

       

      The search MIAW already locates the word searched, and in one window i see the name of the cast member and in the other I can see a preview of the content of this cast member.

       

      On the bottom of the MIAW Search tool, I want to put a button that closes the MIAW and takes the original movie to the frame where the cast member is located... but have not been able to.

       

      How do I program the behavior for this button?

       

      If you want (or need) to see the source Im using, it is attached below.

       

      Thanx

        • 1. Re: search text cast member in frame of a movie
          Sean_Wilson Adobe Community Professional
          On the bottom of the MIAW Search tool, I want to put a button that closes the MIAW and takes the original movie to the frame where the cast member is located... but have not been able to.

           

          How do I program the behavior for this button?

          I haven't looked over your files, but in general you'd need to scan the score of the stage movie looking for sprites that reference the member you found, and then take the stage movie to that frame and close the MIAW.

           

          Pseudo-code:

          on mouseUp me
            tMovie = window("stage").movie
            tMovie.updateLock = 1
            nChannels = tMovie.lastChannel
            bFound = 0
            repeat with f = 1 to 10 -- number of frames
              tMovie.go(f)
              repeat with s = 1 to nChannels
                if tMovie.sprite(s).member.name = "your found text member name" then
                  bFound = 1
                  exit repeat
                end if
              end repeat
              if bFound then exit repeat
            end repeat
          
            -- bFound holds the frame number which contains a sprite referencing your text member
            tMovie.updateLock = 0
            _player.activeWindow.close()
          end
          
          • 2. Re: search text cast member in frame of a movie
            jcsp2001 Level 1

            Hello Sean. Thanx For your answer.

             

            tMovie = window("stage").movie    "stage" refers to the origin movie, or to the search MIAW movie?

            • 3. Re: search text cast member in frame of a movie
              Sean_Wilson Adobe Community Professional
              "stage" refers to the origin movie, or to the search MIAW movie?

              To the movie running as the stage - that is, the first entry in the windowList the window that opens the MIAW. I understood this is the one you are searching through, but perhaps not?

              • 4. Re: search text cast member in frame of a movie
                jcsp2001 Level 1

                I have several director files that each call the same MIAW. This MIAW is a text search tool that searches within all the other files. I guess you refer then to the movie (which I called origin) that calls the search window (MIAW).

                • 5. Re: search text cast member in frame of a movie
                  jcsp2001 Level 1

                  Hi Sean. And how can I do if the behavior has to search within several dir files?

                  • 6. Re: search text cast member in frame of a movie
                    Sean_Wilson Adobe Community Professional

                    And how can I do if the behavior has to search within several dir files?

                    I don't know how your project is structured. If your stage, or main, movie uses 'go to movie "name"' to navigate between "several dir files", and it's only ever these files running as window("stage") that open the MIAW, then it should work like I outlined. Did you try my approach?

                     

                    Otherwise, you'll need to be clearer about how your project is structured, what you've tried already and why it doesn't work as expected.

                    • 7. Re: search text cast member in frame of a movie
                      jcsp2001 Level 1

                      Hello. You' right. This is more or less how i structured the project

                       

                      I am doing a product catalogue, where one movie is the main menu and from which every product is called.

                       

                      Every product is a different movie with the same structure each.

                       

                      These products each have their casts all external ( with and independent cast for only text), and all the text contents is fragmented into cast members (for example the text for dimensions is one cast member, the text for materials is another member, and so on)

                       

                      These product movies, have a column of buttons to the right that access different frames within the movie where the different text cast members are located.

                       

                      From any part in these  product movies I can acces a MIAW that is the search tool.

                       

                      This search tool searches inside all the products casts with help of the dmmFTS.x32 xtra by web-cd.com

                       

                      The search tool  gives the result by searching the previously compiled individual external text casts of the movies

                       

                      The search tool presents its results in a box giving the text cast members name

                      and theres also another box where i can view the text cast members content

                       

                      from these results given in the miaw is from where im trying to

                      - close the MIAW

                      - the movie from which i opened the miaw should go to the frame (if it is in the same movie) or to the movie that contains the cast member in the frame where the cast member is located

                       

                      i hope its a little clearer now...

                      • 8. Re: search text cast member in frame of a movie
                        Sean_Wilson Adobe Community Professional

                        This part:

                        - the movie from which i opened the miaw should go to the frame (if it is in the same movie) or to the movie that contains the cast member in the frame where the cast member is located

                        is crucial, and is what wasn't clear to me - the fact you want to be able to effectively search files that aren't even open.

                         

                        I suggest you create some sort of database that stores movie names and frame numbers along with text displayed on these frames. Then your MIAW can query the DB when required.