How to make an app - Andromo App Maker


No announcement yet.

Sync Graphics with Media Player Content

  • Filter
  • Time
  • Show
Clear All
new posts

  • Sync Graphics with Media Player Content

    HI....Wondering if there's a way to have graphic images synced with a media player video ? Almost like chapter markers in a DVD video.....When the video hits a certain marker/time it would display the next graphic and so on...This way the graphics would be in sync with what the video was playing (talking head).

    Hope that makes sense ?

    Any help would be greatly appreciated.

  • #2
    Sure, just start a page timer (Page.StartTimer) when the video starts. Then go to the page's "On Timer" event and whenever you hit the times that you want, use "Image.Load" to load a new image into an Image object on the page.


    • #3
      Corey....Could you post a sample of code that would show how this is done ?

      Thanks in advance...


      • #4
        Yeah OK, try this:

        Corey Milner
        Creative Director, Indigo Rose Software
        Attached Files


        • #5
          Ok....What if you want it to be in actual sysnc to the video time ? That way if they reque the video the graphics get requed as well. I was playing around with MediaPlayer.GetCurrentPos("Plugin1");
          but so far no go....Any idea on how toget this to work ??



          • #6
            Corey...When you use the "load image" command to bring up a number of images during a video or sound track on cue, does the earlier image get flushed from memory as the new image is loaded?



            • #7
              Adam in Tech Support is the Man !!!

              Hi Everyone, Adam in tech support helped me out on this one and works like a charm.....Here's the solution....

              This can be accomplished using the timer and some actions. For example you could have a timer that fires every second that checks the current position and then does a small IF statement based on this.

              So on Page -> Properties -> Actions -> On Show:

              -- this will fire the timer every second.

              Then on Page -> Properties -> Actions -> On Timer:

              -- get the current time
              time = MediaPlayer.GetCurrentPos("Plugin1");

              if time > 3 and time < 4 then
              Image.Load("Image1", "AutoPlay\\Images\\11111111.jpg");

              time > 33 and time < 34 then
              Image.Load("Image1", "AutoPlay\\Images\\22222222.jpg");

              time > 66 and time < 67 then
              Image.Load("Image1", "AutoPlay\\Images\\33333333.jpg");

              This works like a charm!!!!


              • #8
                Not sure Syverson, I'm not on the programming team so the memory management issues are beyond my scope. Sorry...

                Corey Milner
                Creative Director, Indigo Rose Software


                • #9
                  That snippet octane6228 reminds me of my volume control code in my most current project. Save, I put most into the Global Functions area.

                  Thank you for posting the solution to the situation!

                  [Late Edit] Now, would it be more optimal to have all loaded (all those images in question) and SetVisible == False at the start of the movie? Then just SetVisible == True when needed?[End]
                  Last edited by Intrigued; 02-06-2004, 09:09 PM.