2 Replies Latest reply on Jul 13, 2009 8:08 AM by jbenson@oper8

    Drop shadow problem

    Subbu-AE-LR

      Hi,
      We face the below mentioned problem. Would be great if someone could help us.

       

      Due to problems with uploading the attachment here, please send a email to the following email-id (adobeattachments@gmail.com) and I shall send the attachment in response.

       

      Problem Description: Clicking dropshadow in air component should bring focus to other application behind the air application.

       

      Steps to Reproduce:
      1. Open any applications in full screen. ( ex : MSWord, Notepad )
      2. Run the DropShadow sample.
      3. Click the shadow portion in the panel component.

       

      Actual Result: Clicking the shadow area in the panel component is setting focus to the same DropShadow application.

       

      Expected Result: If some other application are opened in fullscreen ,then clicking the shadow area in the panel component should change the focus to the applications which is behind DropShadow application.

       

      Thanks in advance.

        • 1. Re: Drop shadow problem
          jbenson@oper8 Level 2

          Will be happy to look at your application, however from experience shadows created by using alpha transparency are part of the main application and clicking on them will focus the containing application.  (I can send an example if needed to illustrate this using a png for shading or (for OSX only) css (-webkit-box-shadow).  As far as I'm aware Flash / Flex applications have the same behavior.

          • 2. Re: Drop shadow problem
            jbenson@oper8 Level 2

            After looking at your code your application is behaving as it should.  Essentially your flash element is defining a drop shadow.  It is part of your application therefore when the user clicks on it, it's like clicking on the rest of the application.

             

            Some programming languages get around this by using regions and relying on the operating system to generate the drop shadow (when available.)  For instance in a C# application you would define a region, clip everything outside of it (so that it is transparent) and then use the windows API to shadow your application.  When using the API the OS then uses it's rules to define whether you clicked on the application or not.  This also leads to all sorts of weirdness when you have anti aliased window shapes (curves and the like) and do not want them to look terrible.

             

            So AIR applications handle this by allowing you to have completely transparent windows if the underlying window manager supports it.  The drawback then is that you are not using the OS to define your shadows and so your shadows are part of the application window and clickable.  On the plus side AIR allows for a great bit of flexibility that is not so easily attained in other ways.  (I once lost about 2 weeks of my life on a C# app just getting rounded edges to not look extremely horrible.)

             

            For an illustration consider if you created a custom popup menu that was 50% transparent.  For all intents and purposes to AIR that is identical to the drop shadow you are creating here however in that instance you would want it clickable etc.

             

            Hope that helps!