Could someone help with video code snippet?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sue
    Indigo Rose Customer
    • Mar 2004
    • 169

    Could someone help with video code snippet?

    Hi Everyone!

    I hope someone can help me accomplish the following:

    I have a new niece and would like to do a baby announcement that will do the following:

    I have a short video (a .wmv or .avi) of the baby and a png of the opening frame of the video. I would like to show the .png when the app opens while the video loads - but not visible - in the background. I'm thinking I can use a timer so that after a short time the video replaces the .png so the video plays. When the video finishes the .png reappears - and the video is not visible. When the .png reappears there will be a play button so the recipient of the app can replay the video. I can't seem to figure out the code that I need to do this ....

    I'll also have the baby's stats (weight, birthdate, time, etc.) on the screen - like a printed baby announcement.

    Can someone help me with a code snippet or sample for the video and png part - I can do the rest of it ... but the code and timer to change from png to video and back to png has me confused -

    Thank you sooooo much for any guidance you can provide!

    Sue
  • yosik
    Indigo Rose Customer
    • Jun 2002
    • 1858

    #2
    Sue,
    First of all, congratulations!

    As to what you want. It is simple enough.
    You have 3 objects: a video objects (video1) a play button (play_BT) and a png image.
    Set the attributes of the video object and the button to invisible.

    1. Put your video ontop (exactly!) of your png image.

    2. under the onShow Tab of the page, add the following actions:
    Video.Load("Video1", "AutoPlay\\Videos\\baby.avi", true);
    Video,SetVisible ("video1",true(;
    [This will load the video and start playing automatically after it is loaded]

    3. Under the onFinish Tab of the video object, add the following actions:
    Video.SetVisible("Video1", false);
    Button.SetVisible("play_BT",true);
    [this will make the video invisible, thus showing the png underneath and make the button visible]

    4. Under the onClick Tab on the button, add the following actions:
    Video.SetVisible("Video1", true);
    Button.SetVisible("play_BT",false);
    Video.Play("Video1");

    Hope that helps.
    Good luck
    Yossi

    Comment

    • sue
      Indigo Rose Customer
      • Mar 2004
      • 169

      #3
      Thanks, Yosik!

      Thanks for the response .... I really appreciate it!!! I edited this message because I see how you solved the issue ....

      Thanks again .... I think your solution will do what I need!

      Sue


      Originally posted by yosik
      Sue,
      First of all, congratulations!

      As to what you want. It is simple enough.
      You have 3 objects: a video objects (video1) a play button (play_BT) and a png image.
      Set the attributes of the video object and the button to invisible.

      1. Put your video ontop (exactly!) of your png image.

      2. under the onShow Tab of the page, add the following actions:
      Video.Load("Video1", "AutoPlay\\Videos\\baby.avi", true);
      Video,SetVisible ("video1",true(;
      [This will load the video and start playing automatically after it is loaded]

      3. Under the onFinish Tab of the video object, add the following actions:
      Video.SetVisible("Video1", false);
      Button.SetVisible("play_BT",true);
      [this will make the video invisible, thus showing the png underneath and make the button visible]

      4. Under the onClick Tab on the button, add the following actions:
      Video.SetVisible("Video1", true);
      Button.SetVisible("play_BT",false);
      Video.Play("Video1");

      Hope that helps.
      Good luck
      Yossi
      Last edited by sue; 05-24-2005, 04:10 PM.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Huzzah for Yossi! :yes

        Comment

        • Worm
          Indigo Rose Customer
          • Jul 2002
          • 3971

          #5
          Maybe I take the lazy way, but if you do this.

          Video.Play("Video1")
          Video.Pause("Video1")

          The video object will show the first frame of the video, and then there is no need to hide/show an image of the first frame.

          Comment

          • yosik
            Indigo Rose Customer
            • Jun 2002
            • 1858

            #6
            True, Worm. Although there might be a flash.
            But what about the function that would freeze to first frame at the end of the movie and the button that would play it again?

            Yossi

            Comment

            • Worm
              Indigo Rose Customer
              • Jul 2002
              • 3971

              #7
              The hide/show method is definitely the better/cleaner solution. I was more showing how lazy I am than anything

              Comment

              • sue
                Indigo Rose Customer
                • Mar 2004
                • 169

                #8


                I'm all for lazy solutions!!!

                ..... but one of the most important parts of this need is not showing the initial black screen ....

                Thanks for all the input!
                Sue


                Originally posted by Worm
                The hide/show method is definitely the better/cleaner solution. I was more showing how lazy I am than anything

                Comment

                • yosik
                  Indigo Rose Customer
                  • Jun 2002
                  • 1858

                  #9
                  Worm,
                  YOU lazy!!???
                  Yeah, right...Just after Einstein and Newton.
                  Yossi

                  Comment

                  • TJ_Tigger
                    Indigo Rose Customer
                    • Sep 2002
                    • 3159

                    #10
                    Originally posted by yosik
                    Worm,
                    YOU lazy!!???
                    Yeah, right...Just after Einstein and Newton.
                    Yossi
                    Hee hee :yes :lol
                    TJ-Tigger
                    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                    "Draco dormiens nunquam titillandus."
                    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                    Comment

                    • Corey
                      Indigo Rose Staff Alumni
                      • Aug 2002
                      • 9745

                      #11
                      Worm,
                      YOU lazy!!???
                      Yeah, right...Just after Einstein and Newton.
                      Yossi
                      Hee. :yes

                      Comment

                      Working...
                      X