Announcement

Collapse
No announcement yet.

How do I do a dropdown menu of Videos to Play and PDFs to read?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tone
    replied
    That's cool mate :yes

    In the helpfile alongside the first page there is an example section yeah?
    and
    here is another site with many examples of great coding and apps from the users in here
    www.amsuser.com

    Are you going on to make other stuff or just seeing how it goes for now? When i first started i had like 20 projects on the go lol. I still haven't finished about 12 of them.

    I see my approach has been criticised for the second time. In time you might understand why i posted that, if not doesn't matter.

    This is my last view of this thread. Can't stand the bitchyness.

    Cheers!

    Click image for larger version

Name:	SNAG-0000.jpg
Views:	1
Size:	42.9 KB
ID:	283331

    You're done pal.
    Last edited by Tone; 04-07-2011, 05:22 PM.

    Leave a comment:


  • Cybergraph
    replied
    Two users, about the same date since they joined the forum, about same number of posts, same program and SAME USER MANUAL, one problem, two codes:

    Code:
    combo_text = ComboBox.GetText("ComboBox1");
    
    if (combo_text == "Tesla 1") then
    File.Open("Tesla's Longitudinal Electricity", "AutoPlay\\Videos\\LongitudinalElectricity.div x", "", SW_NORMAL);
    
    elseif (combo_text == "Tesla 2") then
    File.Open("Tesla's Race to Zero Point Energy", "AutoPlay\\Videos\\RacetoZeroPointFreeEnergy.f lv", "", SW_NORMAL);
    
    end
    Code:
    File.Open (ComboBox.GetItemData(this, ComboBox.GetSelected(this)), "", SW_SHOWNORMAL);
    IMO it's not completely the fault of the manual.

    Leave a comment:


  • judgedredd
    replied
    I think I will use cybergraph as my help file His explanation was very clear. Companies like AMS need to have user manuals written by people like him for non-technical newbies like me and have another manual for, well, techies written by techies!

    Leave a comment:


  • Tone
    replied
    You're welcome my friend and i think all the time spent experimenting with AMS is never useless, even if you aren't producing anything at the moment and just eliminating what you "don't need". It's all useful in the end.
    When you get to know the helpfile better you'll see it's really quite adequate and excellent actually, and in time you sorta grow to love it, and coupled with the search box in the forum you can't really go wrong.
    Don't despair, the trick is to keep going and keep asking questions. There's some amazing coders in this forum mate, who are very very friendly and helpful.
    There's a way to do exactly what you want to do, it's just a matter of getting there

    Leave a comment:


  • judgedredd
    replied
    Thanks for the reply Tone. I will stay with what I have at the moment although I did see another problem .... when the finished DVD is put into a Mac or Linux machine it won't play because it has an autoplay.exe file and it has been finished to play on PC's only. Since this is a project for a friend who has a Win Xp machine I will not delve into how to make the splash screen appear on other types of OSes. I have spent way too much time on this project as it is (mostly because the AMS help files are quite useless for non-programming people).

    Leave a comment:


  • Tone
    replied
    You could convert all of the movie files to the same format.
    If you convert them all to MPEG 1 there won't be any problem on any PC. If you are worried about the finished size convert them to MPEG 4. ( These too can be played with Microsoft's Media Player or an equivalent PlugIn like the one in Autoplay Media Studio.

    Leave a comment:


  • judgedredd
    replied
    I thought about that and looked into it. But the only supported video codecs are from Adobe (Flash), Apple (mov), and Windows. I covered the possibility that the user may not have a player that will play all the movies so have included he program, or links to it for Mac, that plays them all (VLC). I don't think I can play the videos from within the combobox utilising AMS's inherent players, as when I click on the icons in the tool bar it comes up with an ugly big box. Or it is going to mean a lot more asking questions while I code the combobox differently. As it is, I have it very close now to what I envisioned.

    Leave a comment:


  • Cybergraph
    replied
    Ok, now it's clear: the problem is how to say to an external player to automatically start the video.

    Probably some players can accept a command line argument that will tell the player to start the video, but you will never be sure which player the user have.

    At this point you must consider to display the video inside the AMS app whitout using an external player.

    AMS supports a wide range of video formats and, in this way, you have a complete set of tool inside AMS to do anything you want with your videos.

    Leave a comment:


  • judgedredd
    replied
    I am not sure if I was clear.

    The actions I would like someone to do is:

    Put the DVD, with my AMS project on it, into the computer's DVD drive >
    The DVD splash screen appears on the computer monitor >
    User goes to second screen and chooses to view one of the videos in the combobox >
    Video loads into a player on the users computer >
    Video starts playing automatically without any input from the user.

    Leave a comment:


  • Cybergraph
    replied
    Pity that AMS does not have such clear explanations.
    Maybe Indigorose should hire me to renew the user manual?

    You would probably be someone I would learn a lot from with other languages too (like php).
    Sorry, I don't know enough of PHP to teach it. I'm trying to learn C++ but I have not enough time, so AMS is my developement tool by now because its language is easy and fast to reat/write.

    I would like it to play automatically, and I am talking about the movie on the DVD not the DVD itself.
    The DVD functions are another field where I can not give a great help, but as far I know, in each DVD there is a text file called "content.plv" which contains indications for the Player about which track to start and other parameters.

    Try searching in Google for "content.plv".

    Leave a comment:


  • judgedredd
    replied
    Hi,

    Thanks for your post. It was VERY clear. Makes absolute sense. Pity that AMS does not have such clear explanations. You would probably be someone I would learn a lot from with other languages too (like php).

    Ok. The autoplay that I am talking about is when the video player loads the file and opens. It just sits there until one clicks the 'Play' arrow. I would like it to play automatically, and I am talking about the movie on the DVD (that I have created with AMS) not the created DVD itself.
    Last edited by judgedredd; 04-07-2011, 12:16 PM.

    Leave a comment:


  • Cybergraph
    replied
    No more need to have the APZ now. I figured out what were your needs.

    Regarding "it does not autoplay", what do you mean? the CD or the movie?

    By the way, where in the help file does it give the format that you gave me? I have spent more than a day on this, so am a bit miffed that a piece of code so simple is not given in the help files (at least I can;t seem to find it).
    In the user manual is not specified the code I used, it is the result of the association of various functions (they are individually in the manual), for example:

    File.Open requires, as the first parameter, a filename, so I tell AMS to get the filename from a ComboBox:

    File.Open (ComboBox.

    But where, in a ComboBox, AMS will look into? I'll tell him to look in the Data field in this way:

    File.Open (ComboBox.GetItemData(

    Now, AMS knows that the filename must be retrieved in the data field of a ComboBox, but which ComboBox? This ComboBox!

    File.Open (ComboBox.GetItemData(this,

    The "this" parameter gets the current object name where the code is executed, without the need to specify the real object name.

    While trying to get an item data (or an item text) in a Combo, AMS needs to know the index number of the item, by this I tell AMS to get the index number of the selected item of a ComboBox:

    File.Open (ComboBox.GetItemData(this, ComboBox.GetSelected(

    But which ComboBox has an item that has been selected by the user? this, (the same Combo where there is this code):

    File.Open (ComboBox.GetItemData(this, ComboBox.GetSelected(this)),

    I wish to have been clear in my explanation.
    Last edited by Cybergraph; 04-07-2011, 12:07 PM.

    Leave a comment:


  • judgedredd
    replied
    Just subscribing to this thread as I can't seem to do it any other way (without posting this).

    Leave a comment:


  • judgedredd
    replied
    Hi cybergraph,

    Yes, your code works perfectly. Thank you very much! The only thing that is a niggle is that it does not autoplay, although being a quicktime movie I wonder if that is because of Apple's player and not the code.

    As to the apz file, it is 4.01 GB in size so obviously I can't upload that

    How do I get just the script/front end to save? I tried doing the file > export and that is what happened.

    By the way, where in the help file does it give the format that you gave me? I have spent more than a day on this, so am a bit miffed that a piece of code so simple is not given in the help files (at least I can;t seem to find it).
    Last edited by judgedredd; 04-07-2011, 11:34 AM. Reason: Gave thanks.

    Leave a comment:


  • Cybergraph
    replied
    Fill the ComboBox properties in this way:

    Click image for larger version

Name:	ComboBox.jpg
Views:	1
Size:	90.4 KB
ID:	283329

    Then use my code AS IS without modifications, putting it in the "On Select" script of the ComboBox:

    Code:
    File.Open (ComboBox.GetItemData(this, ComboBox.GetSelected(this)), "", SW_SHOWNORMAL);
    It works. Tested!
    Last edited by Cybergraph; 04-07-2011, 11:12 AM.

    Leave a comment:

Working...
X