Just some ignorent guy thinking

hello every one
how would i get a movie clip to alpha fade out to 0 then back to 100 and back agian…
in action script

onClipEvent (enterFrame) {
	if (this._alpha >= 100 ) {
		alpha = -5
	} else if (this._alpha <= 0) {
		alpha = 5
	}
	this._alpha += alpha
}

pretty easy … isn’t it? :beam:

thaks man you just increased my knowledge of actionscript
never thought about useing else if anyways thanks agian

no problem man =)

by the way … the [color=red]else if[/color] statement isn’t necessary …

onClipEvent (enterFrame) {
	if (this._alpha >= 100) alpha = -5
	if (this._alpha <= 0) alpha = 5
	this._alpha += alpha
}

BUT! the else prevents flash from checking the other condition when the first one is true. And if it IS true, theres no point in checking the second because you know its not going to be true also.

… not that it matters anyway :slight_smile: