Hi! I want to share with you this very interesting and simple to make stuff.
So, follow the steps:
1.Open Swishmax and onFrame(1) add this code:
onFrame (1) { balls = 15; MovieClip.prototype.drawCircle = function (o) { this.lineStyle(20, o << 16, 100); this.lineTo(0.450000, 0.150000); }; MovieClip.prototype.follow = function (mc) { this.onEnterFrame = function () { tx = mc._x; ty = mc._y; this._x = tx - (tx - this._x) / 1.500000; this._y = ty - (ty - this._y) / 1.500000; if (Math.abs(tx - this._x) < 1 && Math.abs(ty - this._y) < 1) { this._x = tx; this._y = ty; } }; }; for (i = 0; i < balls; i++) { mc = this.createEmptyMovieClip("ball" + i, i + 1); mc.drawCircle(i * balls); if (!i) { mc.onEnterFrame = function () { this._x = _root._xmouse; this._y = _root._ymouse; }; continue; } mc.follow(this["ball" + (i - 1)]); } }
2.That's it.Now test your mouse trailer in FlashPlayer.The color in my example is red.
Note: If you want to change the color of the balls change this value:
this.lineStyle(20, o << 16, 100);, where the 16=red color.Change this number for other colors.
Test it in FlashPlayer!
Enjoy
|
|
|