Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    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

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    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

  3. #3
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    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


    Quote 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 at 04:10 PM.

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Huzzah for Yossi!

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    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.

  6. #6
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    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

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    The hide/show method is definitely the better/cleaner solution. I was more showing how lazy I am than anything

  8. #8
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169


    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


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

  9. #9
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Worm,
    YOU lazy!!???
    Yeah, right...Just after Einstein and Newton.
    Yossi

  10. #10
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote Originally Posted by yosik
    Worm,
    YOU lazy!!???
    Yeah, right...Just after Einstein and Newton.
    Yossi
    Hee hee
    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

  11. #11
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Worm,
    YOU lazy!!???
    Yeah, right...Just after Einstein and Newton.
    Yossi
    Hee.

Similar Threads

  1. Article: Using Authenticode Code Signing Certificates
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 10-31-2007, 09:03 AM
  2. Example: Showing a Wait Dialog While a Video Loads
    By Adam in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-12-2004, 12:59 PM
  3. Playing a Video Using Full Screen Mode
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 12:40 PM
  4. Playing a Video using the Embedded Video Object
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 12:36 PM
  5. Playing Multiple Video Files in Sequence
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 11:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts