Posted By

manec on 05/22/08


Tagged

actionscript flash fade


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

mrjthethird
jeeStyle
rodrigo
dbrouse


FadeIn, FadeOut


 / Published in: ActionScript
 

  1. function fadeOut(obj:MovieClip,target) {
  2. onEnterFrame = function () {
  3. obj._alpha -= 3;
  4. if (obj._alpha <= target) {
  5. obj._alpha = target;
  6. delete onEnterFrame;
  7. }
  8. };
  9. }
  10.  
  11. function fadeIn(obj:MovieClip,target) {
  12. onEnterFrame = function () {
  13. obj._alpha += 3;
  14. if (obj._alpha >= target) {
  15. obj._alpha = target;
  16. delete onEnterFrame;
  17. }
  18. };
  19. }

Report this snippet  

You need to login to post a comment.