Hello Ladies and Sirs,
I want build glass effect on Chrome if i move chrome and glass effect should stay at masked background like Windows Vista and 7 effect masked background.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="appcompleteHandler(event)" layout="absolute"
showFlexChrome="false">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
[Embed(source="vista-glass.png")]
private var glass_bg:Class;
//private var screen:Screen;
protected function appcompleteHandler(event:FlexEvent):void
{
var bg:Sprite = new Sprite();
var bmp:Bitmap = new glass_bg();
bg.addChild(bmp);
bg.x = Screen.screens.x;
bg.y = Screen.screens.y;
bg.width = Capabilities.screenResolutionX;
bg.height = Capabilities.screenResolutionY;
bg.blendMode = BlendMode.ALPHA;
canvas.blendMode = BlendMode.LAYER;
canvas.mask = bg;
}
protected function canvas1_mouseDownHandler(event:MouseEvent):void
{
stage.nativeWindow.startMove();
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Platzieren Sie nichtvisuelle Elemente (z.*B. Dienste, Wertobjekte) hier -->
</fx:Declarations>
<mx:Canvas id="canvas" left="10" right="10" top="10" bottom="10" backgroundAlpha="0.5"
backgroundColor="#A6A6A6" mouseDown="canvas1_mouseDownHandler(event)">
</mx:Canvas>
</mx:WindowedApplication>
And XML:
transparent is true.
SystemChrome is none.
And embedded image.
http://sourceskyboxer.2fh.co/Downloads/vista-glass.png
PS It is invisible because you can download right click save image and move to src of my code...
glass-bg sgould stay desktop background if chrome of Adobe Air. Than i want move chrome. But glass effect doesn't show what does it happen? How do i fix it?
Thanks