A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Fade out function

Threaded View

  1. #1
    The Doctor Gonzo
    Join Date
    Feb 2003
    Location
    Misiones - Argentina
    Posts
    71

    Fade out function

    Hi there guys,
    I have this code in flash (AS2)... check it out:

    interior._visible = false;
    back._visible = false;

    function fadeout() {
    onEnterFrame = function () {
    this._alpha -= 10;
    if (this._alpha <= 0) {
    this._alpha = 0;
    delete onEnterFrame;
    }
    }
    }

    gointerior.onRelease = function() {
    interior._visible = true;
    interior.gotoAndPlay(2);
    fadeout();
    };

    stop();


    I have a couple of movie clips in the layout, and a button called "gointerior"
    The idea is that when I release that button, it fades out (the button). So I have created a function called fadeout(); but when I call that function and I test the movie all the movie fades out. I dont know what Im doing wrong. I think that is something related to the function path or something.
    I need your help guys!
    Last edited by fabrizzzio; 06-08-2007 at 09:19 AM. Reason: mistake
    need a light?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center