2 Replies Latest reply on Jul 12, 2011 2:33 AM by CMSTorres

    Create transparent spark.components.Window




      I have a project originally created using Flex 3 where I created several mx.core.Window at runtime (in actionscript).

      Last week I updated the Flex sdk to 4.1 and I replaced the use of mx.core.Window for spark.components.Window (as recomended by the documentation). Here's the code I'm using:


      private var _win:Window = new Window();
      _win.maximizable = false;
      _win.minimizable = false;
      _win.resizable = false;
      _win.showStatusBar = false;
      _win.systemChrome = NativeWindowSystemChrome.NONE;
      _win.type = NativeWindowType.LIGHTWEIGHT;
      _win.width = 800;
      _win.height = 600;
      _win.transparent = true;


      My problem is that the "transparent" property has stopped working! Although i set transparent=true, the window is always opaque. And this worked in mx.core.Window!


      I was careful to check that I had systemChrome=none.

      I tried setting the opaqueBackground property to null. It didn't work.

      I have already tried replacing the window's skin class for one with alpha=0 but that does not work either (although it works if I try to replace the default background color to red (0xFF0000), for example).


      Just out of curiosity, I noticed that if I set the alpha property of the window after it was open,  it does turn transparent - along with all it's contents!!! By this I mean  that everything object inside that window will also be transparent... That is not the behavior I need - I need a window with transparent background with visible opaque objects inside - just as I used to have with mx.core.Window...


      Is this a bug of the spark Window? Should I rollbak my code to the old mx Window?