Flex :: Prevent An MFC Dialog From Handling Enter And Escape Keys And Not Passing It On

Aug 11, 2010

we have a C++ application that hosts a flex application in a MFC dialog. Everything works fine, all button pushes etc are passed directly on to flex with no problem at all, except the enter and escape keys, which immediately closes the dialog. We can trap the enter key, by implementing PreTranslateMessage() or OnOK() and impede the window closing behavior, but we still have the problem of passing these enter key pushes on to the hosted flex app further. There is no "default" button on the form or anything like that, perhaps MFC is linking the enter key to the close button in the title bar behind the scenes or something. Does anyone have any ideas how we can stop MFC from treating the enter key from being a special case.[code]

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Why Are Enter / Escape And Delete Key Disabled

Mar 19, 2010

Now that I have the focus on my DataGrid and I can select a row using the up and down keyboard arrows, I then would like to confirm my row selection by hitting the enter key.But, my keydown listener on the DataGrid doesn't see the enter, escape and delete keys. Most of the other keys are seen. I can browse the list by using the up and down keys (and I can see my function in the keydown listener are called).It only happens when I check my application from the Flash IDE. In debug mode, these keys are taken into account.My DataGrid is not editable but selectable.

View 5 Replies

Professional :: Handling Flash CS4 Font Mapping Dialog With Jsfl?

Sep 20, 2010

I'm setting up some auto build scripts with ant and jsfl for use in Flash CS4. I have a few files that have some missing fonts. For these I just want to have the default mapping selected since the text content in question isn't displayed. I think CS5 may have an option to not display the mapping dialog, but CS4 doesn't. Anyone know if there's a  jsfl method to targert this window and just select 'OK'?

View 1 Replies

ActionScript 2.0 :: Small On Key.ENTER Handling?

Nov 26, 2004

Code:
// msg_box_txt is a TextField for user input
// by hitting ENTER, it sends msg_box_txt.text
var my_listener:Object = new Object();
my_listener.onKeyDown = function() {
if (Key.getCode() == Key.ENTER) {

[Code]...

msg_box_txt should be cleared, empty, after hitting ENTER. the problem that it contains one empty line, and the cursor is at beginning of the second line. how can this be fixed??

View 1 Replies

JavaScript :: Global Keyboard Handling - Not Hearing A To Z Keys?

Nov 11, 2009

I am trying to use Javascript to intercept keyboard events, so I can do CMD-W for "close-window" and whatnot, inside a Flash application, so the Browser doesn't get to use them. Well, I am able to listen for ALT, CTRL, and CMD onKeyDown/onKeyPress events, but I am not able to listen to anything else...

Here is the code, in the index.html file from a Flex Project:
<script language="JavaScript" type="text/javascript">
document.onkeydown = function(event) {applicationKeyboardHandler(event)}
document.onkeypress = function(event) {applicationKeyboardHandler(event)}
function applicationKeyboardHandler(event) {
alert("Key Pressed")
} </script>
I would like to make it so it could listen to any key press, not just alt/ctrl/cmd.

View 3 Replies

ActionScript 3.0 :: Change From Each Text Box By Use Of Arrows,tab, And Enter Keys?

Oct 21, 2011

I need help with a project asap. I am new to AS. I need to be able to change from each text box by use of arrows,tab, and enter keys. Also, the user inputs a number into the textbox and from there I am checking to see if it is the correct one. It is telling me too early that it is wrong before I input.

View 0 Replies

ActionScript 2.0 :: Disable User From Keying Enter Or , Or . Keys

Mar 12, 2004

does anyone know how to disable user from using keys like enter , and . or also zoom in ands out function

View 3 Replies

ActionScript 2.0 :: Using Arrow Keys And Enter For Menu Navigation

Mar 8, 2007

I am trying to create a retroish game and have a few features working but now need a menu system. Most older games use the arrows keys and enter for menu navigation. I was wondering if such a menu system has already been created as it is a simple feature that I am sure someone has made before.

View 4 Replies

ActionScript 2.0 :: Prevent Page Scrolling With Arrow Keys?

Aug 12, 2009

Is this a script out there that will prevent the user from scrolling the page (page up & down) when they press the UP and DOWN arrow keys?

I have created a car game, but the only problem is the page scrolls when the player presses the arrow keys!

I've never had this problem before, usually once you activate the Flash movie then page scrolling is disabled.

When I use my arrow keys to control the car, the page in the browser scrolls up/down.

The problem with this is when you press it a few times, the page scrolls enough where you can only see half of the Flash movie or something and it ruins the game experience.

Note: When I press the UP arrow key, the car moves forward AND the page scrolls. So it's not a matter of focusing on the Flash movie.

View 3 Replies

ActionScript 2.0 :: Disable User From Keying Enter Or , Or . Keys?

Mar 12, 2004

does anyone know how to disable user from using keys like enter , and . or also zoom in ands out function

View 3 Replies

Prevent Enter Key From Working As A Play Button?

Jun 25, 2010

I would like to disable the enter key from working as a play button for Flash 8 or Flash in general.

View 1 Replies

ActionScript 2.0 :: Prevent User Enter 2 Same Answers

Jun 30, 2004

my question is to count how many correct answer the user will enter. if the user enter the same correct answer twice,the 2 same answers will not be count and the other 2 answer will be check whether correct or wrong. If the next 2 answer is correct markk will be add. Take note that i have 5 answers for this question but the user only has to enter 4 of the answers only.

View 1 Replies

ActionScript 3.0 :: Keyboard Control - BACKSPACE And ENTER Keys Are Not Working

Oct 20, 2011

I have the follwoing code to control a Flash-based presentation but BACKSPACE and ENTER lkey are not working. I am puzzled. PD: All the rest of the keys works fine.

[Code]...

View 3 Replies

ActionScript 3.0 :: Passing And Handling Vectors Wrong?

Jun 3, 2011

So I have the code of two classes (I can't post any actual code as its way too long - even broken up But I can give you a sample of simmilar aspects)
 
public class ClassA
{
private var objectString:Vector.<String>; // create a new vector to hold items - this will be passed

[Code]....
 
Yes I have an understanding of vectors so pointing me to the documentation may be worthless. As I have read it hundred times. I would not be posting here if I didnt. How ever I may have missed something.
 
Upon debugging this I see that Class A has a vector that now contains one element -> "hello." When I pass that vector on Object container is null. Whats worse is now I return a null vector list and pass on a null vector list and trace should in theory show me null.
 
In java this is how I would pass vectors and arrays around and I believe some one showed me this is how you do it in actionscript.

View 32 Replies

ActionScript 3.0 :: How To Escape Ampersands Or Where The Escape Needs To Happen

Nov 7, 2011

I've made an AS3 AIR proggie that works with PHP to look at a specific online directory of mp3s, get it's listing, and download to my local machine. It works fine, except when a song name has '&' in it. I'm not sure how to escape ampersands, or where the escape needs to happen - PHP or AS3? Here's the relevant AS3:

[Code]....

View 2 Replies

ActionScript 3.0 :: Flash Passing A Parameter To A Event Handler (Enter Frame)

Jun 27, 2010

Is this possible? I have looked around but I can't really find anything.

View 3 Replies

Flex :: Escape A Colon When Parsing XML In Actionscript?

Mar 7, 2011

say I have XML like this:

<root>
<x:Item>test</x:Item>
</root>

How would I navigate to the x:Item node?

I tried myXml..x:Item and myXml..x::Item but both throw errors. The first won't compile and the second complains about me trying to use NameSpace '0'.

View 2 Replies

Flex :: Unescape Unicode Escape Sequences In ActionScript?

Apr 25, 2011

I am loading html page(UTF-8) content using UrlLoader. All characters in the result are represented as //x??(where ?? is 1 symbol). How can I get normal string from this?(with actual symbols instead of codes)

View 1 Replies

Flex :: Flex Save File Dialog For URL

Oct 15, 2011

I will have a list of links to PDF documents in my Flex web app.What I want to do is that upon clicking some button, open SAVE AS dialog for some pdf from the URL list and download it to disk.What I want to avoid is viewing PDF in browser.ALL I know is that flash.net.FileReference will take raw data but no links.

View 1 Replies

Flex :: Air - Dialog Not Display Immediately?

Sep 11, 2009

In an AIR application I have the following code:

theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
theDialog.addEventListener(FlexEvent.CREATION_COMPLETE, cpuIntensiveCalc);

At the end of cpuIntensiveCalc the dialog is removed. The dialog informs the user that "something is going on, please stand by."

The problem is that cpuIntensiveCalc starts before the dialog draws. So the user experience is that the application freezes for 10 seconds with no indicator, then the modal dialog flashes quickly (less than a second) on screen.

The Adobe docs say this about creation_complete

Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing.

So this feels like the correct event. In the name of completeness, I also tried

theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass;
cpuIntensiveCalc();

View 3 Replies

Flex - Session Handling - Flex BlazeDS Java?

Apr 16, 2011

Am facing issue with session timeout. Say for instance, the user logs into the application and he waits for 30 mins (session timeout time) and then tries to get a service through remote object.Ideally speaking, since the session has timeout the user shouldn't be able to hit the remote object, but this is happening the other way round.

[Code]...

View 1 Replies

Flex :: Back PopUp (Dialog) With A Model

Mar 9, 2010

I'm using MATE on an Adobe Flex project for MVC. On one of our pages, we have a dialog window that is presented to the user that displays them information that comes from RPC. The pages where this dialog pops up is unrelated to the data being displayed so this is a separate model. How do I create a MATE mapping file that will create the dialog window, make it visible to the user, and then inject in data from a model?

View 1 Replies

Flex :: Know When A Dialog Created Through PopUpManager Closes?

May 1, 2010

Is there a easy way to figure out consistently when a Dialog closes that has been created through PopUpManager. I would have suspected some type of message or callback mechanism, but there does not seem to be. In one case I use the WindowTitle component and event that only fires the CLOSE if someone presses the close and give no message when the dialog actually closes.

View 2 Replies

Flex :: Suppressing The EULA Dialog The First Time AIR 2.0 Is Run?

Jul 6, 2010

In AIR 1.5, I accomplished this by putting a 'eulaAccepted' file in Application DataAdobeAIR. This doesn't seem to be working in AIR 2.0. how to suppress the EULA dialog in AIR 2.0.2?

View 1 Replies

Flex :: Workaround On FileReference.save Dialog Box

Dec 14, 2010

Im still new in Flex and currently working on capturing a flash game into a flv video file. Im using FileReference.save() to write the captured file in the user's system. It is working as of now but not the way I want it to be.Is there a way to bypass or automate the save dialog box when invoking the save() api of fileReference?

View 1 Replies

ActionScript 3.0 :: Dictionary With String Keys: Slower Than Object Keys?

Apr 27, 2011

whether using a String as the key in a Dictionary results in slower lookups than using an Object, Class or Custom Object (an instance of developer defined Type)?

When using a String as a key, does the literal String have to be parsed, or does the Dictionary key point to the String Object?

View 2 Replies

ActionScript 2.0 :: Get The AWSD Keys To Work As Smoothly As The Arrow Keys?

May 16, 2003

How do I get the AWSD keys to work as smoothly as the arrow keys. I can put the arrow keys inside an enterFrame

[AS]onClipEvent (enterFrame) {
//move the tank
if (Key.isDown(Key.RIGHT)) {

[Code]....

If I put the AWD keys inside an enterFrame they run until I push another button

View 6 Replies

Flex :: Flash - Alert Dialog Not Showing The Text In 4?

Aug 27, 2010

I am using Flex 4 and running into some problems displaying a simple alert box. The alert box shows up, but the text seems to be the same color as the background. I know the text is there because if I mouse over in the alert box window to roughly where the text would be, I can see the cursor change. And when I double click and copy-paste into notepad, I can see the message. But the message, the button text, the message box title don't show up.The relevant code in my project is as follows

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:s="library://ns.adobe.com/flex/spark" layout="absolute"

[code].....

View 6 Replies

Flex :: Show A Modal Confirmation Dialog With Yes No Buttons?

Mar 4, 2011

I need to show a modal confirmation dialog with yes no buttons and get the results what the user has clicked in ActionScript 3

ok save diaglog does not who up when exit is called the application just exits.

Alert.show("Do you realy want to delete", "My Title", 3,null,
function alertClickHandler(event:CloseEvent):void
{

[Code]....

View 2 Replies

Flex :: Events - Determine Which Button Was Clicked In Dialog

Feb 26, 2012

I am using browseForSave() to give the user a chance to save a file before navigating back to a previous screen. As of now the cancel button on the save dialog just closes the save dialog. I want to see if the cancel button was clicked, and if so continue navigating back to the previous screen without saving. Right now the person has to save the file in order to move back. Below is the code I'm using.

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved