开发者

How can I make background fades when a custom component is in focus in Flex

开发者 https://www.devze.com 2022-12-25 04:25 出处:网络
I created a custom component that is a s:SkinnableContainer. I want the background and other items to fade out when this component is visible.开发者_JAVA百科 Something similar to what happens when cal

I created a custom component that is a s:SkinnableContainer. I want the background and other items to fade out when this component is visible.开发者_JAVA百科 Something similar to what happens when calling Alert.show(..) so the Alert box is in focus and everything else is faded out.


set alpha of container of the background to less than 1.

alternatively use custom component as a popup using PopupManager


If you want to blur everything in a container, use something like:

<mx:BlurFilter id="myBlur" blurX="3" blurY="3" quality="3" />

or in AS3

private function blurObj(cont:Container) : void {
  var filters:Array = cont.filters;
  var bf:BlurFilter = new BlurFilter(3,3,3);
  filters.push(bf);
  cont.filters = filters;
}

Change the values of the BlurFilter properties (or constructor args) to values that suit you.

0

精彩评论

暂无评论...
验证码 换一张
取 消