Loading button with _visible command

hi

i am loading a button with _visible command i.e

on(release){
btn1_mc._visible = 1;
}

can i load btn1 with _visible and have it appear from alpha 0 to 100 ?

right now it just pops up

p.d. i cannot make my btn1 a movie clip

thanks

A couple of questions:

  1. Why can’t you change the instance behaviour to that of a movieclip? Select the button then, in the Properties window, choose Movie Clip from the drop-down list.
  2. Assuming you’ve changed the behaviour, you can use this code:
btn1_mc.onRelease = function() {
	this._alpha = 0;
	this.onEnterFrame = function() {
		this._alpha++;
		trace(this._alpha);
		if (this._alpha >= 100) {
			delete this.onEnterFrame;
		}
	};
};
  1. I’m confused why you want a button to fade in from 0 alpha though - if the user can’t see that the button is there, how will they know that they can interact with it? Still, if that’s the way you want to do it you’ll also need to set the alpha value, or the visible value, to 0 or false before the onRelease function.