Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2003
    Posts
    14

    Grin Pop-up window in AMS 5

    Hi guys,

    This seems like such a simple request, that I can't believe I haven't found a resolution anywhere else, but here goes...

    I would like to insert a button/hotspot onto an AMS 5 page, that fires up a new window, and displays an AVI video.

    I can create a standalone page with a Video object embedded in it, but I don't want to jump to another page - instead, I just want to pop-up a page *over* my existing page -- kinda like I could do with the window.open command in Javascript with HTML.

    My question is... is there any way to launch a pop-up window in AMS 5, over an existing project page?

    I found another thread on this board, where a guy wanted to do exactly the same thing.

    You can check it out here -> http://www.indigorose.com/forums/sho...&threadid=2386

    Both of the suggestions given to the dude, I thought, were overkill -like me, all he wanted to do was open another AMS window *on top* of an existing window, which would be apart of the same app, not a separate one.

    Instead, the suggestions were to launch a *second* instance of a AMS project (a huge overhead, I feel, considering the dir structure of a complete autorun.exe project or the need to extract files from a compressed executable) or to use a HTML window -- both of which would seem quite clunky, for simply wanting to display a video on top of an existing page.

    Is there any way to do this in AMS 5?

    My intended use is to have a "click here to display a video tutorial" link on the main AMS project page, and when a user clicks it, a video displays with all the usual controls available to me in AMS. If I use a HTML box, I lose all of this control.

    Likewise, if I compiled the video in a separate project and saved/launched it as a compressed executable, it would take ages to load - some of my videos go up to 200mb in size, which on a CD-ROM drive using the compressed executable option, I'm guessing, would need to read the *entire* file, extract it to the user's HD, and THEN play it -- which could present a lag period of a minute or more on some machines.

    I'd like the video to play instantly, have all the video controls available to me that are available in a usual AMS window, and be apart of the SAME project -- avoiding launching a HTML window altogether.

    Can this be done?

    Cheers! ~Lee

  2. #2
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    I might be missing something here, but all you have to do is point to the video and open it. Depending on what Media Player you want the video to open with (whether their default player or WMP), you could even determine that at runtime.

    You can have your application check to make sure they have the latest Media Player before it runs and simply do this with your hotspot -

    On Click Event:

    File.Open("AutoPlay\\Videos\\yourvideo.avi", "", SW_SHOWNORMAL);

    It will open in their default player.

    Of course, you may want to initially associate (or ask to associate) *.avi to WMP, just in case they have another Media Player associated. Lots of easy options here.

  3. #3
    Join Date
    Oct 2003
    Posts
    14
    Thanks for your comments Ron, but unfortunately that wouldn't work...

    What I'm trying to do here is have the video play in an *AMS* window, and
    avoid using third-party apps altogether.

    AMS has excellent support for AVI videos (as well as Flash), and I'd like to
    take advantage of them if possible. Also, the other big consideration is
    ensuring that my videos play uniform across all separate Windows platforms.

    Most of my videos are in 800x600 screen res, and most players (including
    WMP) tend to squash videos down to a certain size, or resize the raw images
    and blow them out of proportion. By defining a specific size in AMS, I keep
    in control -- and can then issue commands such as Video.Stop, etc, at will.

    But I guess what I'm trying to do, at that end of the day and most of all,
    is to keep everything all under one roof. Requiring a separate video player
    is, I feel, a tad unprofessional considering my clients pay good money for
    my educational presentations -- and like most good CD-ROMs, I'm trying to
    build a completely custom interface to suit that requirement.

    It's very easy to do - but, would provide a MUCH more intuitive and
    interactive interface if I could pull up the video in a separate window
    that's "raised" from the main presentation, and then have my visitors
    close it at will -- just like a Javascript window.open initiation command.

    It doesn't seem as if AMS yet supports multiple window sizes and multiple
    window instances though, so for now, I'll have to come up with a quick
    workaround.

    Guys... is this a feature you plan to add in a future release?

    Cheers ~Lee

  4. #4
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Well, I do see what you are trying to achieve now, and I believe you will have to make a "separate app" to do it. Or maybe your request is a good one as far as maybe IR making a plugin that will support what you're doing. I apologize for trying to be so simplistic. Especially if you're trying to get "the look and feel" of an "on top" window (different size and attributes altogether - AMS environment), I totally see now what you're trying to accomplish. I really don't think it would be that much overhead, do you (making the additional app)? Another app would only be a meg or so.

    Hey, good luck with your attempts ! And I'm sure someone here will have a solution for you. All these guys are great!

  5. #5
    Join Date
    Dec 2003
    Posts
    163
    i like popups too
    take a look at this: http://www.indigorose.com/forums/sho...&threadid=6004

  6. #6
    Join Date
    Dec 2001
    Location
    Northam, Western Australia
    Posts
    98

    Popup Media Player

    Hi Lee,

    Short of developing another application in order to facilitate the pop-up media player, I've been working on several video projects, one of which proposes to use the native Divx 5.11 player for the pop-up.

    The Divx player is the leanest around, featuring a very thin, unobtrusive border. It's just a matter of installing the Divx codec along with the optional player (no need to reboot), and then call the player to popup with the desired video.

    Alternatively, I've built a project that uses the APMS5 media player to play 640x480 Divx videos, but the issue, I agree is having a project with a small interface having to play a video that is larger in size.

    (I wonder what the merits are of having video at 800x600 pixels, as the end-user machine really needs to be pretty powerful. DV capture is at 720x576 and for desktop PC use I usually take it back to 640x480 rather than risk enlarging it. At 640x480 you'll find that the video will still retain good integrity even when playing it full screen eg at 1280x960).

    Regards,

    John

  7. #7
    Join Date
    Dec 2001
    Location
    Northam, Western Australia
    Posts
    98

    Pop-up video player

    Hi Lee,

    The code below uses the DivX player in its default installation location:

    File.Run("C:\\Program Files\\DivX\\DivX Player\\Divx Player.exe", _SourceFolder.."\\Video\\ltap640dvx.avi", "", SW_SHOWNORMAL, true)


    Now a better programmer than I am may write a piece that checks for the default installation of the “Divx Player. exe” and if installed, then executes the player to play the selected video.

    Alternatively, if the player or codec isn’t found, the user then is asked did they want to install the DivX codec and player.

    Once installed, it’s click-and-play, with a satisfactory popup directly from your project interface. (Why create a whole new second project when such a free player is available).

    The only reason I’ve chosen the DivX player in this instance, is of course, 1) I’m using the DivX 5.11 codec to create the AVI videos and 2) the default DivX Player is the least obtrusive with minimal bells and whistles -- and therefore I think less bothersome or intimidating for those with minimal PC experience.

    If you do write some good code for a popup player like the DivX Player, or at least something similar, then I'd be interested to see how this is done. I the meantime, I will also work on a few "if" and "else" scenarios.

    Regards,

    John

    PS the attached screen capture shows an example of the DivX popup video player from a smaller, irregular shaped interface.
    Attached Images

  8. #8
    Join Date
    Jul 2003
    Posts
    712
    Hello Lee,

    While it isn't possible to open another window from within your app (when i want to do this, i just launch it in a scroll-bar-less web browser), one action you might want to take a look at is the Dialog.SplashVideo() action. It doesn't come with any controls, but you can set it to remain on the screen (it 'floats' over your project) for the length of your video, and allow the user to click it to exit.

    That's all i can think of on this Christmas Eve.

    Happy Holidays!

  9. #9
    Join Date
    Dec 2001
    Location
    Northam, Western Australia
    Posts
    98

    Dialog.SplashVideo

    Hi Desmond,

    What a simple and lean method of playing a video clip - without the overhead of a thirdparty or secondary app. A short video clip of around 2-3 mins duration probably, in most instances, wouldn't require the controls anyway!

    In both methods, CPU utilisation is similar, but only half of the RAM is used in the Dialog.SplashVideo method.

    Thanks.

    John

  10. #10
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    Yep, best idea so far. Works very well and is a piece of cake to use. Maybe a little limited [controls etc.] but that may be ok too.
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts