Button selection of ListBox Item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dwhittall
    Forum Member
    • Jan 2007
    • 3

    Button selection of ListBox Item

    Hi there,

    I am totally new to AutoPlay Medio Studio 6.0, but have been working through the Tutorials, loading Examples, and searching the Forums.

    I have followed the Media Player example, showing use of PlayList and ListBox.

    All examples seem to have the user DoubleClick an item in the ListBox.
    I want to use a single click of a Button on Page1, to play a specific 'Item' in the 'ListBox1' on the 'VideoPage'

    Basically the Project I am playing with, calls for 13 Buttons on Page 1, that represent 13 Video Chapters. There is also a 'Play All' button.

    There is more to it than that -thumbnail images over the buttons that dim on MouseOver and display a Paragraph giving Sypnosis on that Chapter, as well as display of an enlarged ScreenShot from that chapter. I have got this sorted out OK.

    I have set up a new 'VideoPage' with the MediaPlayer 'Plugin1' and added a 'ListBox1', to which which I have manually added the Titles and the 13 video files 'Data'.

    What I want to do is, when the user clicks on a Chapter via 'Button1xx', there is Jump to 'VideoPage' and the Media play AutoPlays the 'xx' Item in 'ListBox1', then returns to Page1.

    If the 'PlayAll' button is clicked then Jump to VideoPage, but this time starts with Item01 in the ListBox1, returning to Page 1 when all '13' chapters played in ListBox1 sequence.


    From information I have picked up on the Forum, I get the idea that I need to assign a variable, to the onclick 'Button1xx' event, before the Jump to Videopage?

    I just can't seem to work out, how to use this variable = 'True', to Select 'xx' item in the ListBox1. This launches the MediaPlayer, using the Data entry of the Item selected?

    I am sure this can be done with the Scripts, but have not yet discovered how - any pointers please?

    Best Regards,

    David
    Last edited by dwhittall; 02-01-2007, 09:29 AM.
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #2
    Hi David and welcome to the world of ams

    as for what you want to achive it is very doable with scripting,

    but you could try assigning some global vars,

    ie in global functions or actions>>startup
    Button1Clicked = false
    Button2Clicked = false
    Button3Clicked = false
    and so on for each button you have

    then in the button (example for button one)
    Button1Clicked = true
    Page.Jump("Page1");
    then in the onshow event of the video page

    if Button1Clicked == true then
    Video.Load("Video1", "AutoPlay\\Videos\\MyVid.avi", true, false);
    end
    and so on for each of the 13 files

    and in the player onfinish event reset all the vars and jump back to page one

    Button1Clicked = false
    Button2Clicked = false
    Button3Clicked = false
    Page.Jump("Page1");

    all that would take care of the single files and the play all would require a little more work,

    ill set about making a example as i cant think of the top of my head, but the above is just one of many ways you could go about it
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    • RizlaUK
      Indigo Rose Customer
      • May 2006
      • 5552

      #3
      OK, forget what i said above, it would have just made hard work

      here is a example that dose close to what you want, but instaed of having 13 buttons there is only 2, 1 button to play all items in the listbox and 1 button to only the selected item, and when the file has finish playing it will jump back to the title page

      this example uses worms functions from this post to get the "play all" and a second set of functions to get the selected item, there is a hidden listbox on the video page that contains all the data wich if filled according to what button you have clicked

      i have put in a button to fill the listbox but you can hardcode the text and data i just use the dynamic way for ease of use when testing

      hope this helps
      Last edited by RizlaUK; 02-01-2009, 11:35 AM.
      Embrace change in your life, you never know, it could all work out for the best

      Comment

      • dwhittall
        Forum Member
        • Jan 2007
        • 3

        #4
        Hi RizulaUK,

        Thanks for the reply and the suggestions.

        I understand you adding a dynamic fill ListBox for ease. Not sure how the 'Chapter' Button Click would pick up the Itemxx of this ListBox for the Jump to the Video or Media Player page?


        I loaded the example you gave here, but there seems to be a Page2 Video Object problem?

        The Page2, Video Object: AutoPlay\Videos\Magnolia.mpg
        "Unable to display object: File can not be located"

        But if I understand the concept of your suggestion correctly, one has a ListBox on Page 1, that gets copied to a PlayList on the Media Player page. This MediaPlayer Page then plays whatever is in the Playlist, and returns the user to the original page when done?

        If this is correct, I just have to figure out, how have my Buttons load the required Video into the ListBox1, then execute this 'Copy and Play' part. The 'Play All' Button, loading all xx Videos into ListBox1.

        Many thanks for the suggestions, just got to play them them some more to see if I can get it to work?

        Cheers,

        David

        Originally posted by RizlaUK View Post
        OK, forget what i said above, it would have just made hard work

        here is a example that dose close to what you want, but instaed of having 13 buttons there is only 2, 1 button to play all items in the listbox and 1 button to only the selected item, and when the file has finish playing it will jump back to the title page

        this example uses worms functions from this post to get the "play all" and a second set of functions to get the selected item, there is a hidden listbox on the video page that contains all the data wich if filled according to what button you have clicked

        i have put in a button to fill the listbox but you can hardcode the text and data i just use the dynamic way for ease of use when testing

        hope this helps

        Comment

        • RizlaUK
          Indigo Rose Customer
          • May 2006
          • 5552

          #5
          Hi,

          the video error is because when i added the video object i used one of the gallery videos and removed it b4 i exported the project to reduce the size, i dident reslize it would cause a error as the page onshow loads a new video,

          the play selected button will do the same job as the play all button, but it will only play the selected item in the list box, the button dosent need to know what video is selected, the functions take care of that, the buttons only jump page,

          you can still add the video name and path in the listbox and it will work the same, you can just rip out the add files button and it wont change a thing, it was just easyer fior me to add a folder at a time rather that enter all the items into the listbox

          if there is a reason that you must have all 13 buttons then post your project and i will see what i can do with it,


          here is the same apz minus the error
          Last edited by RizlaUK; 02-01-2009, 11:35 AM.
          Embrace change in your life, you never know, it could all work out for the best

          Comment

          Working...
          X