Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    18

    Must I do code for every movie?!

    I have 10 movies over eachother och 10 buttons to start and stop them. Do I need this code under every button or can I do it smarter?

    ON CLICK
    Video.SetVisible("Video1", false);
    Video.Stop("Video1");
    Video.SetVisible("Video2", false);
    Video.Stop("Video2");
    Video.SetVisible("Video3", false);
    Video.Stop("Video3");
    Video.SetVisible("Video7", false);
    Video.Stop("Video7");
    Video.SetVisible("Video5", false);
    Video.Stop("Video5");
    Video.SetVisible("Video6", false);
    Video.Stop("Video6");
    Video.SetVisible("Video8", false);
    Video.Stop("Video8");
    Video.SetVisible("Video9", false);
    Video.Stop("Video9");
    Video.SetVisible("Video10", false);
    Video.Stop("Video10");

    Video.SetVisible("Video4", true);
    Video.Play("Video4");

  2. #2
    Join Date
    Jul 2003
    Posts
    18
    Work very well! Thanks!


    Originally posted by Pip-Boy
    You could instead have just one video object. That way you could use:

    Video.Load("Video1", "Autoplay\\Videos\\MyMovieName.avi", true, false);

    substituting the "MyMovieName.avi" part with the name of the movie file you want to load on each button. This would load the movie you need into the "Video1" object so you only need to place one on the screen instead of 10 and setting the visibility on each button.

    The 'true' parameter would make the video start playing immediately, skipping the need for Video.Play also.

    If your videos are different sizes, you can use

    Video.SetSize("Video1", MyMovieWidth, MyMovieHeight);

    on each button as well to set the size of the "Video1" object so your movies don't distort in size.

  3. #3
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. I notice you are posting and replying to your very own questions using multiple user names from the exact same IP again. Not sure why you keep doing that but I would just like to politely request that you refrain. Thanks.

    Corey Milner
    Creative Director, Indigo Rose Software

Posting Permissions

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