Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    33

    Please help me with problem

    I have a Video object "Video1" and a button in my project.
    I want to click the button, which will open "Dialog.FileBrowse" - there I'll select a video file and this file will load into the "Video1" object - I used this script:
    Code:
    video_file = Dialog.FileBrowse(true, "Locate File", "C:", "All Files (*.*)|*.*|", "", "avi", false, true);
    
    Video.Load("Video1", video_file, true, false);
    and it doesn't work (there's a message "Page1 -> Button1 -> On Click, Line 3: Argument 2 must be of type string"). Could you help me?

  2. #2
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    Try this Code:
    Code:
    vidFile = Dialog.FileBrowse(true, "Open File", "C:\\", "Video Files (.avi, .mpg, .mpeg, .wmv, .asf, )|*.avi;*.mpg;*.mpeg;*.wmv;*.asf", "", "", false, true);
    
    if (vidFile[1] ~= "CANCEL") then
        Video.Load("Video1", vidFile[1], true, false);
    end
    All i did was create a new project with the video player template.

  3. #3
    Join Date
    May 2007
    Posts
    33
    It works!
    Thank you very much!

    And I've got one more question: When the video loads, is it able to resize the video object to size of the loaded video?
    Last edited by Hofiiik; 08-07-2007 at 11:22 AM.

  4. #4
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    Your welcome!

  5. #5
    Join Date
    May 2007
    Posts
    33
    Quote Originally Posted by mz241508 View Post
    Your welcome!

    And don't you know answer on my second question, please?

  6. #6
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    What is the code in line 3?

  7. #7
    Join Date
    May 2007
    Posts
    33
    The next lines are:
    Code:
    vidFile = Dialog.FileBrowse(true, "Open File", "C:\\", "Video Files (.avi, .mpg, .mpeg, .wmv, .asf, )|*.avi;*.mpg;*.mpeg;*.wmv;*.asf", "", "", false, true);
    
    if (vidFile[1] ~= "CANCEL") then
        Video.Load("Video1", vidFile[1], true, false);
    end
    
    
    vlastnosti = Video.GetProperties("Video1");
    Video.SetPos("Video1", 2, 2);
    vyska = (vlastnosti.Height)+37
    sirka = (vlastnosti.Width)+4
    Window.SetSize(Application.GetWndHandle(), sirka, vyska);
    Or look into my project...
    Attached Files

  8. #8
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    Try this code:
    Code:
    vidFile = Dialog.FileBrowse(true, "Open File", "C:\\", "Video Files (.avi, .mpg, .mpeg, .wmv, .asf, )|*.avi;*.mpg;*.mpeg;*.wmv;*.asf", "", "", false, true);
    
    if (vidFile[1] ~= "CANCEL") then
        Video.Load("Video1", vidFile[1], true, false);
    end
    
    
    properties = Video.GetSize("Video1");
    Video.SetPos("Video1", 2, 2);
    height = properties.Height+37
    width = properties.Width+4
    Window.SetSize(Application.GetWndHandle(), width, height);
    volume = Video.GetVolume("Video1");
    Input.SetText("Input1", volume);
    Image.SetPos("Image1", 10, properties.Height+2);
    Image.SetPos("Image2", 51, properties.Height+2);
    Image.SetPos("Image3", 92, properties.Height+2);
    Image.SetPos("Image4", 162, properties.Height+2);
    Image.SetPos("Image5", 210, properties.Height+2);
    Image.SetPos("Image6", 10, properties.Height+2);
    Input.SetPos("Input1", 104, properties.Height+11);

  9. #9
    Join Date
    May 2007
    Posts
    33
    It's the same - the video object doesn't change its size...

Similar Threads

  1. Problem installing fonts
    By ByronFS in forum Setup Factory 7.0
    Replies: 5
    Last Post: 05-08-2006, 12:23 PM
  2. Video Problem
    By ScottDuncan in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 07-10-2004, 01:38 PM
  3. PROBLEM: Setup Starts and then Crashes
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-15-2002, 03:02 PM
  4. PROBLEM: Setup Requests Disk 2 in a Single File Setup
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-09-2002, 02:04 PM
  5. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 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