PDA

View Full Version : DVD-style navigation



Silver Zero
02-14-2004, 09:16 AM
Hey all! I like the support base of these forums, which is why I'm hoping I can get a good answer to this pretty quick. I'm building a video-launcher project that is basically a homebrew DVD menu in style, meaning there are labelled thumbnails that, when clicked, will launch a particular sequence. Multiple pages, forward/back buttons, etc. all work fine.

My question now is, can AMS be configured to "jump" between thumbnails in response to arrow keys on a keyboard or, preferably, a remote control? I'd like to have a mouseover-type event that just highlights which button the cursor is over when it's over it, but I don't want the user to be dependent on a mouse to navigate; I want them to be able to just click left, right, up, down, and then hit another button to trigger "enter" when they're at the right thumbnail. Basically what you get with a DVD in a standalone player.

How does one set this up?

Thanks!

yosik
02-14-2004, 11:23 AM
Can be done, silver.
use the onKey event for the page. based on the Esc code of the arrows and Enter, you can activate buttons or use hotspot
Good luck
Yossi

Silver Zero
02-14-2004, 11:44 AM
Wow, lots of stuff I don't understand there (did I mention I'm pretty new?), but I'll fish around for a bit. Would this work with a remote control, too? I guess I'd have to figure out what the directional key transmissions are, wouldn't I? I'll play.

Thanks!

Intrigued
02-14-2004, 11:50 AM
For example:

On Key (for say the Page):

if e_Key == 37 then
-- do some thumbnail actions
else
end

Silver Zero
02-14-2004, 11:57 AM
Okay, that's a good start. Thanks!

Intrigued
02-14-2004, 12:01 PM
Virtual Key Codes (ASCII code)

I went myself to the Help section of APMS 5 Pro and printed such out and now I have that list next to me when I am coding.

I know 37 through 40 are the arrow keys right off.

Tip: 37 is the left arrow key and then go clock wise around and you will have the numbers as they relate to their keys.

Silver Zero
02-15-2004, 11:40 PM
I'm sorry, but I'm still stuck on this. Can I make one of my thumbnail images an input object? I can't select that option unless I'm on the page background.

What I have is a page with 6 thumbnail images in 3x2 configuration. I want to have the first one automatically selected whenever that particular page is loaded (indicated by, say, an arrow next to the thumbnail image or something). Then, I want to enable the user to navigate down to the image below, or right or left, or up, logically to the thumbnail (or "next page" button) they want, all with single key presses - right arrow moves the cursor over to the next thumbnail immediately, not just incrementally across the page stroke after stroke. If I can get that far, I'm sure I can map the rest to a remote receiver. Does this make any sense?

Corey
02-15-2004, 11:48 PM
Yes it makes sense. :) And it is very do-able. The best place to start is figuring out how to use those key codes, here's a link to a great post by Desmond on that very topic:

http://www.indigorose.com/forums/showthread.php?threadid=6205&highlight=eKey

Keep us posted. :)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Silver Zero
02-15-2004, 11:50 PM
I love quick replies. :D

Will play.

yosik
02-16-2004, 12:46 AM
Silver,
What I would do is use the Page.setFocus() action to the desired object on the menu, then use the ASCII code keys to navigate.
Yossi

Corey
02-16-2004, 02:01 AM
Here's a simple sample project attached, it scrolls through a bunch of icons using the left and right arrow keys, perhaps this will help you get started... :)

There's one action on the Page's OnShow and the rest are all on the Page's OnKey event...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Silver Zero
02-16-2004, 08:55 AM
Oh Corey, you're awesome! This will definitely help. Thanks a TON!

:)

Silver Zero
02-16-2004, 09:29 AM
Just another thanks to all you who helped out here. After actually seeing the code, it makes perfect sense. I'm a visual learner, so Corey, thanks for dumbing it down for me. :)

I'm going to play with having a whole string of "if/then" commands for each button, like "if button = 6 then button = 8" instead of the adding approach (which was great for the example, I just have an irregular layout, and the spatial arrangement isn't always just +/- whatever).

Thank you again!

Corey
02-16-2004, 09:37 AM
:)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)