Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2006
    Posts
    8

    grid mp3 playlist questions

    hello . how can you get it to jump to the next track automaticly after the tracks on the grid playlist are finishid. track finish and automaticly jump next row ?
    Attached Files

  2. #2
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    On Finish

    Since you know what 'track' is playing next, you can use the On Finish action of the MP plugin or Audio object to load/play the next track in sequence.

    hth

  3. #3
    Join Date
    Jun 2006
    Posts
    8
    list box sample code

    Mp plugin "on finish"

    Code:
    piko = ListBox.GetSelected("playlistbox");
    
    	if (piko ~= nil) then
    	piko[1] = piko[1] + 1;
    
    	if piko[1] <= ListBox.GetCount("playlistbox") then
    
    		ListBox.SelectItem("playlistbox", piko[1]);
    		
    		playmovie = ListBox.GetItemData("playlistbox", piko[1]);
    
    		MediaPlayer.Load("Video1", playmovie);
    	
    	else
    		
    
    	end
    end
    but how can i do this code working in a grid plugin

    sory im very bad speek english

  4. #4
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    grid

    Upon completion of a playing track "On Finish" of the MP plugin; you can increment to the next row in the grid, then Use Grid.GetCellText() to extract the next value of the "track" in the grid; and so on, until you have depleted the rows in the grid.

    Unfortunately there is not a tutorial for the grid object - but you should be able to follow the examples in the AMS help.


    hth

  5. #5
    Join Date
    Jun 2006
    Posts
    8
    what kind of code should I use in order to increment the row to 1 space above automatically? can you write me the code?

  6. #6
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by kedipikolata View Post
    can you write me the code?
    Learn by trying, try to set the rownumber of the last played song, then on finish you just select the next by adding one to the last played song.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  7. #7
    Join Date
    Jun 2006
    Posts
    8
    2 days only this idea trying but i cant get a rows number and set rows number i cant automaticly select a number

  8. #8
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    I really don't have a lot of time to spend coding this but something like this should get you started loading the grid. This hasn't been tested but as I said should get you started.

    Code:
    tuneTbl={} -- set up a tune table
    tuneTbl = File.Find("AutoPlay\\Audio\\tunes\\", "*.ogg", false, false) -- find and load all ogg files
    for x = 1, Table.Count(tuneTbl) do
     	last = Grid.InsertRow("Grid1", -1, true) -- inserts at next available row
    	Grid.SetCellText("Grid1", last, 0, tuneTbl[x], true) -- load the tune
    	Grid.AutoSize("Grid1", GVS_DATA, true) -- expand the cell 
    	Grid.Refresh("Grid1") -- refresh the grid
    end
    You should be able to repeat this code for *.MP3, *.Wav etc. to load the grid. I would think there should be numerous examples on the forum as to loading and manipulating grids...(maybe not)

    hth

  9. #9
    Join Date
    Feb 2008
    Location
    Western Pennsylvania
    Posts
    555

    Star Hmm

    I got this error:

    Page1 -> Video2 -> On finish, line 3: Argument 1 must be of type table.

    ??

    Joe

Similar Threads

  1. Playlist Actions
    By RizlaUK in forum AutoPlay Media Studio 7.5
    Replies: 6
    Last Post: 02-24-2011, 06:59 AM
  2. Stuck in XML
    By playmenow in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 03-17-2006, 01:03 PM
  3. How can I make a MP3 Playlist using a m3u or psl playlist
    By darknis in forum AutoPlay Media Studio 4.0
    Replies: 21
    Last Post: 12-17-2004, 07:26 PM
  4. MP3 Playlist
    By Cameron in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 04-26-2003, 04:08 PM
  5. HOWTO: Set up an MP3 Playlist
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-24-2002, 11:57 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