Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
hari_d #21
Keyboard Shortcuts
Did any body tried to access the flex components at run time using key board
shotcuts? I badly need working code or any suggestions. I perticulartly needed
for TabNavigator and also for all most all controlers. Thanks in advance.:o
hari_d Guest
-
keyboard shortcuts bug
Hi, for months I live with this keyboard bug: after a while working things like CTRL+C doesn't copy but the codewindow closes and other... -
Keyboard shortcuts in CS?
I have gone ahead created keyboard shortcuts in CS. I installed some new filters and somehow one of the f key functions (f1=gaussian blur) got moved... -
cs keyboard shortcuts
Went to shortcut presets to find one for feather. There were two. Opt+com+D brings the dock up. I deleted that and went with shift+F6. This did... -
Capturing keyboard shortcuts using IE
Are there any activex controls that will allow my web application to utilize keyboard shortcuts (ctrl-s for example) like a windows application? We... -
keyboard shortcuts in asp.net
How do we write the code for Keyboard shortcuts in asp.net(c#).Is it possible through javascript only or there is any method/property availaible... -
fluffysocks #22
Re: Keyboard Shortcuts
Look in the livedocs ([url]http://livedocs.macromedia.com/flex/15/[/url]) language reference and search on 'key class'.
fluffysocks Guest
-
hari_d #23
Re: Keyboard Shortcuts
thank u very much for valuable info but I did get some compilation error after
using an example code for Key class in Action Script Language Reference( pg
#297), saying "there is no property with name '_accProps'. Do you have any idea
about this.
Here is my code..
// ActionScript Document
function initApp()
{
var myListener:Object = new Object();
Key.addListener(myListener);
myListener.onKeydown = myOnKeyDown();
my_btn.onPress = myOnPress();
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");
}
hari_d Guest
-
cd12 #24
Re: Keyboard Shortcuts
Hi,
I tried the above code and also get the same error although I already turned
accessibility to true in the flex-config.xml file. And the Alert gets executed
when the page loads, without having to press ctrl+7, how come? Please help.
Here's my code:
Thanks.
--------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" height="100%"
backgroundColor="#FFFFFF" initialize="initApp();">
<mx:Script>
<!]>
</mx:Script>
<mx:Button id="my_btn"></mx:Button>
</mx:Application>
cd12 Guest
-
AnotherInsanity #25
Re: Keyboard Shortcuts
Well, this code is wrong, you need to use an event handler all you're doing is
setting the var my_btn.onPress to do myOnPress();
That's why it will load when the application starts.
if ( my_btn.onPress ) {
my_btn.onPress = myOnPress();
}
Should do the trick.... it may be there's a specific value of a button you
need to check for but you can find that in the documentation
my_btn.onPress = myOnPress();
AnotherInsanity Guest



Reply With Quote

