Be a Supporter!

Fade out?

  • 175 Views
  • 12 Replies
New Topic Respond to this Topic
seal36
seal36
  • Member since: Jun. 22, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Fade out? 2009-07-28 13:49:37 Reply

im having trouble with creating a fade out. for a fade in from black i know that you draw a black box which covers the stage, right click, transform etc.

but how do you create a fade out?

billowillo
billowillo
  • Member since: Apr. 21, 2008
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to Fade out? 2009-07-28 13:53:02 Reply

stage.addEventListener(Event.ENTER_FRAME, eFrame)
function eFrame(event:Event):void{
	mcBox.alpha -= .01
}

like that.


.

BBS Signature
Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Fade out? 2009-07-28 13:53:36 Reply

At 7/28/09 01:49 PM, seal36 wrote: im having trouble with creating a fade out. for a fade in from black i know that you draw a black box which covers the stage, right click, transform etc.

but how do you create a fade out?

Well if you can do a fade in, you can do a fade out...


BBS Signature
seal36
seal36
  • Member since: Jun. 22, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Fade out? 2009-07-28 13:55:33 Reply

is there any way you can animate it like the technique i mentioned for fading in?

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Fade out? 2009-07-28 13:59:19 Reply

At 7/28/09 01:55 PM, seal36 wrote: is there any way you can animate it like the technique i mentioned for fading in?

Ask yourself whether fading out is the exact opposite to fading in.


BBS Signature
Anamethatworks
Anamethatworks
  • Member since: May. 17, 2009
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Fade out? 2009-07-28 14:05:25 Reply

you could just draw a black box, make it a symbol. then place a keyframe later in the timeline, and give it a color alpha effect thing (bottom bar in cs3) and use that to set it's alpha to 0 (on the first of the two keyframes) then motion tween it. which will cause it to slowly fade from totally transparent to totally black.
you could then use easing for some more advanced-ish fading options

seal36
seal36
  • Member since: Jun. 22, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Fade out? 2009-07-28 14:07:11 Reply

listen, when i try to fade out it either stays as a black box or fades in, no fading out. now are you going to help or continue to piss me off?

seal36
seal36
  • Member since: Jun. 22, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Fade out? 2009-07-28 14:08:24 Reply

thanks aname.

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Fade out? 2009-07-28 14:11:38 Reply

At 7/28/09 02:07 PM, seal36 wrote: listen, when i try to fade out it either stays as a black box or fades in, no fading out. now are you going to help or continue to piss me off?

I'm not trying to piss you off, I'm trying to help you realise how to do it on your own. Trying to get those brain cells working.

But since that clearly didn't work:

Draw your box. Convert it to a movieclip. Insert a keframe at the end of the fade. Then on the first frame (where the fade starts), change the alpha of the box to 0, and insert a motion tween it.


BBS Signature
FlashtooREV
FlashtooREV
  • Member since: Jun. 9, 2009
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Fade out? 2009-07-28 14:16:15 Reply

At 7/28/09 02:11 PM, Neo-13 wrote: and insert a motion tween it.

A shape tween.


Ceterum censeo Carthaginem delendam esse.

TheChomper
TheChomper
  • Member since: Jul. 29, 2008
  • Offline.
Forum Stats
Member
Level 19
Artist
Response to Fade out? 2009-07-28 14:23:16 Reply

At 7/28/09 02:16 PM, FlashtooREV wrote:
At 7/28/09 02:11 PM, Neo-13 wrote: and insert a motion tween it.
A shape tween.

A motion tween actually, because he said he's using a symbol. A shape tween would work for a regular vector rectangle though.

FlashtooREV
FlashtooREV
  • Member since: Jun. 9, 2009
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to Fade out? 2009-07-28 14:25:58 Reply

At 7/28/09 02:23 PM, TheChomper wrote: he said he's using a symbol.

Yeah I forgot that for a second. D: Shame on me.


Ceterum censeo Carthaginem delendam esse.

seal36
seal36
  • Member since: Jun. 22, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Fade out? 2009-07-28 17:27:18 Reply

i had used anames advice before yours neo, but thanks anyway. (and yes motion tweening worked fine)