Easy to make color light flash animation effect

Source: Internet
Author: User
Flash Animation


Click here to download the source file

The production is very simple, the basic is to apply the mask effect, copy a number of light strips use some randomness to produce the effect

for (var i:number = 0; i<15; i++) {
var tmpmc:movieclip = Light.duplicatemovieclip ("Light_" +i, i+1);
tmpmc._x = Randomzone (150, 500);
tmpmc._y = Randomzone (150, 400);
Tmpmc._xscale = Randomzone (70, 120);
Tmpmc._yscale = Randomzone (70, 120);
tmpmc._rotation = Randomzone (0, 360);
Tmpmc.b.gotoandplay (Randomzone (1, 130));
Tmpmc.b.a.gotoandplay (Randomzone (1, 50));
Returns the random number of S to E, including S and E
function Randomzone (S:number, E:number): number {
Return S+math.floor ((e-s+1) *math.random ());

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.