"hugetv" wrote:
I have 2 category and each realm has its movies but to the select category select 1 category 2 film film 1
I think the problem is the gridscreen you are using requires a multidimensional array.
First, for testing, you should use unique data so you can check your results -
rather than having both categories as Movie Test 1, Movie Test 2, and Movie Test 3 for both categories, change the names to
Movie Test 1,1 Movie Test 1,2 Movie Test 1,3
Movie Test 2,1 Movie Test 2,2 Movie Test 2,3
It will help with troubleshooting, if needed.
In the gridscreen/selection routine - the wait loop where the user can scroll around and choose an item to play, use isListItemFocused to store the value of what is currently highlighted.
Initialize the row as 0 and the column as 0
If msg.isListItemFocused()
row=msg.GetIndex()
col=msg.GetData()
Print"Focused msg: ";msg.GetMessage();"row: ";row;
Print" col: ";col
GetIndex() is the row, and GetData() is the column. Using this data you can tell what video to play if the user selects the currently highlighted item.
In the same loop for the gridscreen, use If msg.isListItemSelected() to handle passing control to another screen (either a springboard screen or video playback screen of your choice) and send the information for the item along with the call to the new screen.
If msg.isListItemSelected()
PlayVideoScreen(row,col)
It's easier if you have a master list of content for the entire screen, before setting the content itself - because then you can refer back to that when calling the next screen.