You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, June 29th 2012, 10:08am

keyboard control (WCAG2 compliant) - making scene specific

I have a set of panos for a hotel in a single xml file, to meet the client's accessibility requirements (and to be WCAG2 compliant) we need to provide keyboard control within the tour.
I have been testing the following code:

<!-- actionscript keyboard control for standard buttons -->
<events
onkeydown="action(keydown);"
/>
<action name="keydown">
trace(keydown - keycode=,keycode);
if (keycode == 49,loadscene(pano1));
if (keycode == 50,loadscene(pano2));
</action>
which works fine, pressing '1' loads pano1, pressing '2' loads pano2 etc
My question is this... can this only be done 'globally' within the xml file, ie is it possible to change the actions, depending on the scene, so for example if you are in pano2 and press 2 (keycode 50) you can have a different action.
In other words I want to make some of the keydown actions scene specific.
Thanks in advance
Tim

2

Saturday, June 30th 2012, 5:59pm

solved - keyboard control (WCAG2 compliant) - making scene specific

Created an action for each scene type, ie keydown-bed, keydown-bar etc



then called the action from each scene.