Posted By

burakkirkil on 07/29/12


Tagged


Versions (?)

Blur Screen


 / Published in: ActionScript 3
 

Blur Screen

  1. public function blurScreen() : void
  2. {
  3. var blurMc:Sprite = null;
  4. if (getChildByName("blur"))
  5. {
  6. blurMc = getChildByName("blur") as Sprite;
  7. }
  8. else
  9. {
  10. blurMc = addChild(new Sprite()) as Sprite;
  11. blurMc.name = "blur";
  12. TweenMax.to(blurMc, 1, {blurFilter:{blurX:10, blurY:10, quality:1}, colorMatrixFilter:{brightness:1.5}, ease:Sine.easeOut, overwrite:OverwriteManager.AUTO});
  13. }
  14. blurMc.graphics.clear();
  15. var blurBitmapData:* = new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295);
  16. blurBitmapData.draw(this);
  17. blurMc.graphics.beginBitmapFill(blurBitmapData);
  18. blurMc.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
  19. blurMc.graphics.endFill();
  20. return;
  21. }// end function

Report this snippet  

You need to login to post a comment.