how do you do rollovers llike

Out of context: Reply #15

  • Started
  • Last post
  • 72 Responses
  • hollowcube0

    okay, this is how i do it:

    i have the following code on the timeline of a movieclip containing the button (this movieclip is placed multiple times on the stage with attachMovieClip). Oh yea, i also have a gray box called 'fader' contained within this movie clip.

    // start of code //
    this.mybutton.onRollOver = function() {
    this.fader._alpha = 100;
    this.goAway = 0;
    }

    this.mybutton.onRollOut = function() {
    this.goAway = 1;
    }

    this.mybutton.onEnterFrame = function () {
    if (this.goAway) {
    this.fader._alpha -= 10;
    if (this.fader._alpha <=0){
    this.goAway = 0;
    }
    }
    }
    // end of code //

    There's more to it than this, but you should get the basic idea.

    hope this helps.

View thread