Activate events on application
Can anyone with some expertise regarding transparent Adobe AIR applications have a look at this issue? http://stackoverflow.com/questions/23225425/adobe-air-application-activated-incorrectly I'm thinking this is more of an AIR issue than it would be a Flex issue but I know there are some experts on this mailing list so this is why I'm here to ask for help. Anyone know of the specific reasons an AIR app will be activated (dispatch applicationActivate event) by the OS? When clicking in a transparent area it should not be activated IIRC. -- View this message in context: http://apache-flex-users.246.n4.nabble.com/Activate-events-on-application-tp6234.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
Is there a specific reason your application is sized to 100% of the user's screen? From what I understand you have the main application fill the whole screen but only a small portion (search box) is visible. If that is the case, start your main app minimized and remove it from the taskbar (visible=false) and have it launch a new (customized) Window (mx.core.Window). This new Window will be your search box with minimal dimensions that you can then move to the location you want. regards, Peter On 23/04/2014 9:05, Fréderic Cox wrote: Can anyone with some expertise regarding transparent Adobe AIR applications have a look at this issue? http://stackoverflow.com/questions/23225425/adobe-air-application-activated-incorrectly I'm thinking this is more of an AIR issue than it would be a Flex issue but I know there are some experts on this mailing list so this is why I'm here to ask for help. Anyone know of the specific reasons an AIR app will be activated (dispatch applicationActivate event) by the OS? When clicking in a transparent area it should not be activated IIRC. -- View this message in context: http://apache-flex-users.246.n4.nabble.com/Activate-events-on-application-tp6234.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
It is sized 100% because in other areas more components will pop-up. Also inside the application there is a sidebar component which is aligned to the right of the screen. When the application is inactive the sidebar will resize to 1px. The app needs to be always in front so that when the user moves the mouse to the edge of the screen on the right side a mouse_over event will be detected and the sidebar will slide back in to be 300px width. This way my app will behave as a sidebar on the OS which will be able to fill the screen with several components. This is needed for a CRM application used internally in the company I work for. -- View this message in context: http://apache-flex-users.246.n4.nabble.com/Activate-events-on-application-tp6234p6243.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
If you have drawn pixels of alpha=0 then I wouldn't be surprised if those pixels pick up mouse events. On 4/23/14 12:05 AM, "Fréderic Cox" wrote: >Can anyone with some expertise regarding transparent Adobe AIR >applications >have a look at this issue? >http://stackoverflow.com/questions/23225425/adobe-air-application-activate >d-incorrectly > >I'm thinking this is more of an AIR issue than it would be a Flex issue >but >I know there are some experts on this mailing list so this is why I'm here >to ask for help. > >Anyone know of the specific reasons an AIR app will be activated (dispatch >applicationActivate event) by the OS? When clicking in a transparent area >it >should not be activated IIRC. > > > >-- >View this message in context: >http://apache-flex-users.246.n4.nabble.com/Activate-events-on-applicat >ion-tp6234.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
That is my guess too Alex. However in the docs it is stated: Important: On Linux, mouse events do not pass through fully transparent pixels. You should avoid creating windows with large, fully transparent areas since you may invisibly block the user’s access to other windows or items on their desktop. On Mac OS X and Windows, mouse events do pass through fully transparent pixels. http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7e09.html#WS5b3ccc516d4fbf351e63e3d118676a452d-7fe5 So on MacOSX it "should" work. Any idea on where to go with this? AIR bug? OS issue? Can I somehow log this or detect? All I'm getting now is an activated event without a reason. If I could somehow "deactivate" my application when it is activated and the mouse is not where I want it to be that could be a workaround but I can't find how to deactivate an AIR application either. -- View this message in context: http://apache-flex-users.246.n4.nabble.com/Activate-events-on-application-tp6234p6245.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
If you have time, run a test with an ActionScript-only project (no Flex code). It could be that Flex is still drawing something. But it is unclear from the doc snippet what "fully transparent" means. It could still mean that you didn't draw anything vs drew something with alpha=0 On 4/23/14 9:58 AM, "Fréderic Cox" wrote: >That is my guess too Alex. However in the docs it is stated: > >Important: On Linux, mouse events do not pass through fully transparent >pixels. You should avoid creating windows with large, fully transparent >areas since you may invisibly block the user¹s access to other windows or >items on their desktop. On Mac OS X and Windows, mouse events do pass >through fully transparent pixels. > >http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7 >e09.html#WS5b3ccc516d4fbf351e63e3d118676a452d-7fe5 > >So on MacOSX it "should" work. Any idea on where to go with this? AIR bug? >OS issue? > >Can I somehow log this or detect? All I'm getting now is an activated >event >without a reason. >If I could somehow "deactivate" my application when it is activated and >the >mouse is not where I want it to be that could be a workaround but I can't >find how to deactivate an AIR application either. > > > >-- >View this message in context: >http://apache-flex-users.246.n4.nabble.com/Activate-events-on-applicat >ion-tp6234p6245.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Activate events on application
Don't know if it will work but have you tried manually dispatching a DEACTIVATE event? On 23/04/2014 17:58, Fréderic Cox wrote: If I could somehow "deactivate" my application when it is activated -- Lee Burrows ActionScripter
Re: Activate events on application
In that case you can still go for the workflow I described. I'm doing exactly that with two applications I'm working on. For the sidebar, you could dynamically resize it depending on its state. Again, I'm doing exactly that with 2 apps which both have a notifications system. The notification window's height is set dynamically, depending on the number of notifications. Use a WindowManager to control the layout (position, size, etc..) of all the windows, save positions in a SharedObject so you can restore the application state when the app is (re)started, etc.. regards, Peter On 23/04/2014 17:11, Fréderic Cox wrote: It is sized 100% because in other areas more components will pop-up. Also inside the application there is a sidebar component which is aligned to the right of the screen. When the application is inactive the sidebar will resize to 1px. The app needs to be always in front so that when the user moves the mouse to the edge of the screen on the right side a mouse_over event will be detected and the sidebar will slide back in to be 300px width. This way my app will behave as a sidebar on the OS which will be able to fill the screen with several components. This is needed for a CRM application used internally in the company I work for. -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Activate-events-on-application-tp6234p6243.html Sent from the Apache Flex Users mailing list archive at Nabble.com.