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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!