Hi all, I am trying to allow my users to access screen UI component thru
KeyBoard. In order to do that I am using _accProps property of UI components
(according to macromedia livedocs).

Actually I got the following code from macromedia live docs
http://livedocs.macromedia.com/flex/15/
<http://livedocs.macromedia.com/flex/15/> 
But when I try to run(F12) my .mxml file I am getting compilation error
saying "there is no property with the name '_accProps'". Can any one tried
Key board shortcuts?
Here is the code in my .as file.
// ActionScript Document

function initApp()
{
var myListener:Object = new Object();
Key.addListener(myListener);
myListener.onKeydown = myOnKeyDown();
my_btn.onPress = myOnPress();
if(my_btn._accProps == undefined)
{
my_btn._accProps = new Object();
}
my_btn._accProps.shortcut = "Ctrl+7";
Accessibility.updateProperties();
}

function myOnKeyDown()
{
// 55 is key code for 7
if(Key.isDown(Key.CONTROL) && Key.getCode() == 55) 
{
Selection.setFocus(my_btn);
my_btn.onPress();
}
}
function myOnPress()
{
mx.controls.Alert.show("hello","myOnPress");
}


Thanks in advance.
Thanks!
Hari



Reply via email to