4 Replies Latest reply on Mar 31, 2009 6:05 AM by tem009

    Communications between moviescript and Enterframe functions?

    tem009
      Here's the problem: I need to print various pages (with Print-o-matic) and the printing is controlled in moviescript. However, the pages contain 2 frames each, the first frame for preparing the page using EnterFrame code (showing "loading" text to the user) and the second frame which is showed after the page is prepared. I need to print of course that second frame.

      If I control the playhead in moviescript to go to the first frame, the EnterFrame functions are not compiled and the playhead never goes to the second frame. If I go to the second frame directly, it isn't prepared correctly. How should I solve this?

      Basically I need to put commands to the moviescript like this: go to the first frame of the page -> do the enterframe functions there -> when the second frame of the page is reached add the page to the printing list -> go to the first frame of another page -> etc


      Is there any way that I could make those EnterFrame functions communicate with moviescript?
        • 1. Re: Communications between moviescript and Enterframe functions?
          James Newton, ACP Level 3
          In your first page, do you have any behaviors (on sprites or in the frame script) which have a handler something like this...

          on exitFrame
          go the frame
          end

          ...?

          If so, then that is what is keeping the playback head on the first page. I'm guessing that you need something like this (pseudo-code):

          on exitFrame
          if the page is now prepared then
          go to page 2
          else
          go the frame -- stay here until everything is prepared
          end if
          end

          If what I'm saying makes no sense to you, then could you provide more details as to what code you are using on the first page?
          • 2. Re: Communications between moviescript and Enterframe functions?
            tem009 Level 1
            The first frame of the page includes the necessary preparing codes (putting texts into the fields etc), and in the end of the code is "go to frame2". The second frame includes only "go to frame" on exitFrame.

            Everything works correctly when the projector is viewed normally, so there is nothing wrong with these codes. My problem is that when user wants to print various pages, the playhead have to move automatically through various pages, and when the playhead is controlled with moviescript these exitFrame functions are not compiled at all.
            • 3. Re: Communications between moviescript and Enterframe   functions?
              Level 7
              Then in whatever code you have that is causing the playhead to move, add
              something like:

              go to frame "part1Setup" --whichever is your setup frame
              sendSprite(0,#exitFrame)
              go to frame "part2" --the printing frame

              sprite(0) is the script channel, and this will cause an error id that
              channel does not contain an 'on exitFrame me' command.
              • 4. Re: Communications between moviescript and Enterframe   functions?
                tem009 Level 1
                quote:

                Originally posted by: Newsgroup User
                Then in whatever code you have that is causing the playhead to move, add
                something like:

                go to frame "part1Setup" --whichever is your setup frame
                sendSprite(0,#exitFrame)
                go to frame "part2" --the printing frame

                sprite(0) is the script channel, and this will cause an error id that
                channel does not contain an 'on exitFrame me' command.



                Thank you very much, this solved the problem.