Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Neat way to make stage fade to black?

New Here ,
Feb 28, 2014 Feb 28, 2014

I am currently trying to find some neat way to make everything on the stage fade to black (like the sun was going down). I know i can just create a stage sized black box with an alpha value of 1 and do something like box.alpha += 1/10;. I was just wondering if there is a cleaner way to do this preferably only using actionscript. I appreciate any sort of respond

TOPICS
ActionScript
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 28, 2014 Feb 28, 2014

Start with an alpha value of 0 for the black area.  You can use the Tween class or any third party tweening engine to gradually change it from 0 to 1.

Translate
LEGEND ,
Feb 28, 2014 Feb 28, 2014

Start with an alpha value of 0 for the black area.  You can use the Tween class or any third party tweening engine to gradually change it from 0 to 1.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 28, 2014 Feb 28, 2014

Can you tell me why this does not work?

darkness = new mc_dark();
addChild(darkness);
var fade:Tween = new Tween(darkness,"alpha",None.easeNone,0,1,120,true);

It seems to be working all right but the movieclip mc_dark never gets an alpha value of 1, more like 0.5.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 28, 2014 Feb 28, 2014

There's nothing wrong with the code you show - aside from using Adobe's tween classes (which suck). Go to greensock.com and get TweenLite/Max, they are by far the best tween classes for Flash.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 28, 2014 Feb 28, 2014
LATEST

Will do thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines