home   |   about   |   time   |   appearance   |   space   |   other   |   tips & tricks    

Cool Background

This is a mix between the tutorials "Jiggling Background" and "Fire Background" so go back and read them if you haven't.
Movie Clip - Frame1 - Fade in

onClipEvent( load ) {
	this._alpha = 0; //sets the transparency to zero
	i = 0; //initializes the counter variable
	xx = this._x;
	// remembers the horizontal position in variable xx
	yy = this._y;
	// remembers the horizontal position in variable yy
}

onClipEvent( enterFrame ) {
	if( i > 33 )
		_parent.play(); // plays the MC if the fade is over
	else {
		this._alpha = i * 3 - random(20);
		// sets the transparency and creates the fade in
		i++;
		// numbers the frames
	}
	this._x = xx + 2 - random(5); //moves the MC left or right
	this._y = yy + 2 - random(5); //moves the MC up or down
}

In the next tutorial we will use two instances of the images placed in the same place but with different Action Script code. Check it out.

Download .ZIP Download .FLA
< Jiggling BackgroundBlurry Background >