| home | about | time | appearance | space | other | tips & tricks |
Cool BackgroundThis is a mix between the tutorials "Jiggling Background" and "Fire Background" so go back and read them if you haven't.
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. |
| Copyright © 2010 WebArticles.org. All rights reserved. Privacy Policy. |
| FlashRandomEffects.WebArticles.Org is not affiliated with Adobe Systems Incorporated, USA. Adobe Flash is a registered trademark of Adobe Systems, Inc in the United States of America and/or other countries. The purpose of this website is to provide information for mastering Adobe Flash and creating Flash effects. |