Flex :: Air Native Window CloseHandler Does Not Work?
Feb 21, 2012
In my Flex (Flash Builder 4) Air application, I have a spark window and have set the close="" event handler (also tried the 'closing' event) to a method that pops up an alert confirming if they want to close the window. This worked fine in my normal browser based app as a TitleWindow, but now that it's an Air app with a native spark window, it's not working. I never see the alert dialog, and if I debug trace, it does in fact go in to my close handler method, but visually I can see the window is already gone from the screen. In an AIR application, how do you add a confirmation dialog for when they click the "x" to close the window?
I have a Native Window in Flex AIR. Let's say the window doesn't have a focus. It is inactive. Is it possible to find out when mouse is over such window? The window is always in front. I heard that it is possible by checking stage.mouseX in ENTER FRAME handler.
If I declare a window this way, and then call this.open(false);, the window will quickly open and then hide, and then be reshown when I actually display it, I want to do this to be able to load content and fit the window to that size before showing it.
Is it possible to send parameters to a closeHandler Alert function? The fisrt parameter the function gets is the CloseEvent, but how to send another one?
I have a Adobe Air app (AS3, not Flex) that has 2 windows. When I click away from them onto another desktop program, I get an "Deactivate" Event (as you would expect).When I click on say Window#1 I get an "Activate" Event (as you would expect).But when I go from Window#1 to Window#2, I get nothing. And I believe this is because the Air application is still the active program, Just a Different Window.
But I have the need to know when I go from 1 window to another.The horrible solutions I have come up with so far is to have an onEnterFrame and check if the current window is the active window. But I would much prefer to do it a much better way that such a hack.I have gone though Stage, NativeApplication and Native Window Events and none of them do what I need. Can anyone point me to another Event I may have overlooked?
I'm developing a multi monitor fullscreen application with Adobe Air 2.6. I can create a window for every monitor, and put those windows to fullscreen. theWindow.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; The problem comes when interacting with those windows. If I click the window on the main monitor (the one with the dock and menu bar) no problem, but when I click any other window the system menu bar becomes visible. I've tried resizing the main window to match the monitor size and moving it to a negative coordinate but it always stays behind the bar. Is it possible to do this in Air?
I'm trying to add an event listener to a window that pops up (to the whole window) that will close that window when clicked on. Basically it's your typical about window that would be found in any program by hitting help, then about this program. I am using no chrome on it so I'd like to just be able to click it and have it close.
On a less important note I'd like to center the window on the stage when it pops up. Right now I'm just using the x and w properties to get it close to center on my monitor but obviously that won't work for everyone. Below is the code I've tried. No luck whatsoever. Window pops up but stays up if I click it. Any help as always would be AMAZING!
How do I load an external swf into an external window? I'm using the following code, it works if i add the swf to the original window's stage but not if i add it to the new window's stage.
my application launches with the stage size of 1000 x 500, 2:1 aspect ratio. the native window has system chrome, which will always be a little taller by a few pixels.how is it possible to only permit a native window to resize proportionately in order to always maintain the 2:1 aspect ratio of the stage?[code]
I have 2 swfs loaded that use a local connection to communicate, they work fine when loaded on the same window but when I load them on separate windows it gives me the following error.
ActionScript Code: Main Thread (Suspended: SecurityError: Error #2070: Security sandbox violation: caller file:///C:%5CUsers%5CSiggy2xc%5CAdobe%20Flash%20Builder%204.5%5CMass%20Media%20CG%5Cbin-debug%5Cswf%5Canimation%5CTest.swfcontrol cannot access Stage owned by app:/Mass_Media_CG.swf.)
I am developing an Adobe AIR application which uses both native windows and floating panels. Is is possible to enable the creation of a floating window instead of a native window when a JavaScript window.open() function is called?
It is required that all of the floating windows are contained within one native window, therefore the creation of more native windows is not suitable.
I have used a Custom HTMLHost class in order to enable the creation of a native window but I can't work out a way of creating a MDI window instead. I am using the flexMDI framework for my floating panel interface.
In this code I'm creating a new window when I click the button. In the new window are TextInput and DropDownList components. When the new window opens, clicking the DropDownList does nothing - you have to click it a second time round to get it to open. However, click into the TextInput field first and then try opening the DropDownList works no problem.
I'm trying to use Greensock LoaderMax on a Starling Framework project, but since Starling have a lots of its own class, how I can make it work with other classes that is using the native class?
I have a component in AIR like so:[code]The 2 alerts both work. however nothing happens when you click the new window link.all 3 links works when in a real browser so I know its ok.Is there just no support for window.open in the AIR HTML component? or is this a bug?Is there a work around?
I have a Flex AIR2 application which uses native process to run CMD.exe. Application running fine on WinXP, Win R 2008 server. But not running on VISTA 64 bit OS. Flex not able to run CMD.exe when application installed in C:Program Files (x86). When I run application as Administrator mode it is working fine. Below is my code, I want to start cmd.exe as Administrator.
I have tried the options given on Adobe Livedocs : adt -package -target native myApp.exe myApp.air, but I keep getting the message "-storetype required". I then try with adt -package -target native -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp.air and get the same message. I have already created the .air file and the .p12 cert file in flexbuilder, and am just pointing to these in the command prompt in the specified places, but the same problem occurs. Any ideas?
In AIR on Mac, when I send login creds to a service and they're incorrect, AIR displays a native popup window to try logging in again without dispatching an error event. Twitter provides a header (suppress_response_codes=true), which returns any error as a status 200 with the error message. I'm using HTTPService to connect to a service without a header like this. Are there any properties or headers I can send to avoid this popup?
It could run a native process in an adobe air application by enable extendedDesktop. But if create an flex library, does it support running an native process. If yes, how to configure it?
How can i create native installer for windows, MAC and linux, which will check the system if air runtime is not install in the user system then installer will 1st install the AIR runtime and then the AIR application.
Do we need to use any third party software to achicve this?
For checking system wether the AIR runtime is install or not Do we need to write custom script or installer will automatically get things done.
i have an adobe air app that captures screen and saves image on desktop. The App works fine on windows 7 but it just does not work on windowsXp. The App use native windows exe that was built in C# using Visual Studio 2010. Its video tutorial and code is given at [URL]...
The app just does not work on windows and gives no compile time or runtime time error and offcourse it does not save image on desktop.
I have done some searching around, and from what it looks like so far, there is no native way to parse JSON in Actionscript/Flex. XML is automagiaclly parsed and life is good. Why isn't JSON parsed this same way?
I would like to tak emy existing AS3 or Flex project and compile it to run on native C++ code. Is there a way to do this? What sort of solutions exist? I do not want to change my AS3 code.
I have to implement AEC in Flex video conferencing application. I know that it can not be done directly in Flash. I'm thinking to write a native application or library that will do AEC outside Flex.
As far I know Adobe Connect Pro is using some external library that do AEC. I'd like to follow this direction and do something similiar.
There comes two possibilities in my mind:
1) Independend custom AEC filter.
The custom AEC filter will be run in the background and will be processing all data from microphone and sound card and doing AEC. The echo signal will be the data that is to be played but delayed in a temporary buffer, something like this: aec(input, delayed_input, output).
I don't know if it work, because Flash microphone input doesn't know about my custom input and the same with the speakers. But how it is done in WinXP/Vista that have AEC at the system level?
2) AEC filter interacting with Flex's NativeProcess.
The filter will be run by NativeProcess. Flex app will pass microphone sound, received remote voice to the filter and return voice with echo removed and then Flex will output this to the speakers. Will it be correct?
If the 2) method is OK then I have following questions:
I will start with Speex's AEC so in what format should be the data pased from Flex? If I choose Flex Speex codec for sound compression can I pass it directly to the speex library? Will be the performance OK? Calling NativeProcess library every sound frame buffer can be time consuming I think. Why there is no AEC implementation in AS3 that can be used directly from Flash? As far I know to do AEC you must have echo data and microphone data (in Flash 10 there is direct access to the microphone). There is definetly something that is stopping doing it like this but I don't know what it is yet :) Is there some free AEC implementation or a DSP library with in except Speex's that I can use?
I would like to be able to operate a scanner from my AIR application. Since there's no support for this natively, I'm trying to use the NativeProcess class to start a jar file that can run the scanner. The Java code is using the JTwain library to operate the scanner. The Java application runs fine by itself, and the AIR application can start and communicate with the Java application. The problem seems to be that any time I attempt to use a function from JTwain (which relies on the JTwain.dll), the application dies IF AIR STARTED IT.[code]
I am building a mobile application in Flex 4.5 and from this app I would like to start the device's native navigation tool, like Google Navigation for example.Is there a way to open the Navigation App using Flex 4.5?