Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

Example: Showing a Wait Dialog While a Video Loads

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Example: Showing a Wait Dialog While a Video Loads

    When a video is loaded from a CD-ROM drive there can be some delay depending on the target system and the size of the video file. Here is an example of a few lines of code that will improve the look of that load time. This example assumes that you are using a Video.load() action to load a video into an existent video object.

    Place this code into the location that is calling the load action:

    Code:
    -- Show the default status dialog
    StatusDlg.Show(MB_ICONINFORMATION, false);
    -- Set the message that appears
    StatusDlg.SetMessage("Loading Video... Please wait");
    -- Set the title of the dialog
    StatusDlg.SetTitle("Loading Video");
    -- Load the video into an existent video object
    Video.Load("Video1", "AutoPlay\\Videos\\LargeVideo.mpeg", true, false);
    Now you must turn off the status dialog once the video has finished loading and is starting to play. Place this code into the "On Play" event of the Video Object

    Code:
    -- Hide the dialog
    StatusDlg.Hide();
Working...
X