Flash as to create powerful particle visual impact effects

Source: Internet
Author: User
Special effects Super strong particle effects, the effect is very good, and you share:



#initclip 1
function Poolclass ()
{
This.stick = {x:300, y:169};
This.onenterframe = This.dragstick;
}//End of the function
Poolclass.prototype = new MovieClip ();
PoolClass.prototype.dragStick = function ()
{
if (this.stick.x < 0)
{
THIS.STICK.VX = THIS.STICK.VX + 4 * math.random ();
}
else if (this.stick.x > 600)
{
THIS.STICK.VX = this.stick.vx-4 * Math.random ();
}
Else
{
THIS.STICK.VX = THIS.STICK.VX + (math.random ()-Math.random ()) * 4;
}//End else if
if (This.stick.y < 0)
{
This.stick.vy = This.stick.vy + 4 * math.random ();
}
else if (this.stick.y > 337)
{
This.stick.vy = this.stick.vy-4 * Math.random ();
}
Else
{
This.stick.vy = This.stick.vy + (math.random ()-Math.random ()) * 4;
}//End else if
this.stick.x = this.stick.x + THIS.STICK.VX;
THIS.STICK.Y = this.stick.y + This.stick.vy;
THIS.STICK.VX = THIS.STICK.VX * 8.000000E-001;
This.stick.vy = This.stick.vy * 8.000000E-001;
This.createnode (Random), random (337), this.stick.x, THIS.STICK.Y, 7 + random (13));
};
PoolClass.prototype.createRandomNode = function ()
{
var x = random (600);
var y = random (337);
var dx = this._xmouse;
var dy = this._ymouse;
var ds = ten + random (20);
This.createnode (x, y, dx, dy, DS);
};
PoolClass.prototype.createNode = function (x, y, dx, dy, ds)
{
var nombre = "nd" + String (this.depth++);
var Neo = This.attachmovie ("Node", Nombre, this.depth);
neo._x = x;
neo._y = y;
NEO.DX = DX;
Neo.dy = dy;
Neo.body._xscale = ds;
Neo.body._yscale = ds;
};
Object.registerclass ("Pool", poolclass);
#endinitclip source file Download: particle effects. rar

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.