Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    help about default player

    i have created an audio player in ams but i want it to automatically play songs i double click. this audio player is my default player for mp3 files etc... is this posibble in autoplay?

  2. #2
    Join Date
    Mar 2007
    Posts
    186
    Yeah it is very possible...

    This goes for the On Double-Click event of the ListBox (ListBox1)
    Code:
    cSelected = ListBox.GetSelected("ListBox1");
    if cSelected then
    cPath = ListBox.GetItemData("ListBox1", cSelected[1]);
    Audio.Load(CHANNEL_NARRATION, cPath, true, false);
    end
    This should go on the On Show event
    Code:
    CurPlaying = 0
    If you want to play a list of file in sequence, when the currant track is done, then put this code in the On Audio event:

    Code:
    if (e_State == "Play") then
    CurPlaying = ListBox.FindItem("ListBox1", -1, LB_BYTEXT, String.SplitPath(Audio.GetFilename(CHANNEL_NARRATION)).Filename);   
    elseif (e_State == "Finish") then
        cSelected = ListBox.GetSelected("ListBox1");    
        cTotal = Table.Concat(cSelected , "", 1, TABLE_ALL);
        cFile = String.ToNumber(cTotal);
        ListBox.SelectItem("ListBox1", cFile + 1);
        cPath = ListBox.GetItemData("ListBox1", cFile + 1);    
        Audio.Load(CHANNEL_NARRATION, cPath , true, false);  
    elseif (e_State == "Stop" or e_State == "Pause") then
        CurPlaying = 0    
    end
    Hope that helps

  3. #3
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351
    I think he's trying to say when you double click on a file.

    Check out this file extension project of RizlaUK's:
    http://www.indigorose.com/forums/sho...file+extension

Similar Threads

  1. Default Media Player
    By HomerJ in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 09-15-2004, 02:56 AM
  2. HOWTO: Install the Flash Player from a CD-ROM
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 04:05 PM
  3. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 02:15 PM
  4. HOWTO: Make a Media Player Object Go Full Screen
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 11:23 AM
  5. Replies: 0
    Last Post: 10-04-2002, 10:09 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