Flash Sparkle Effect

Posted on 2010-01-07
Last Modified: 2012-05-08
I'm trying to build a sparkle effect in Flash 8. I need something similar to the sparkles in the header at this page: I will have some objects falling vertically, and I need the sparkles to come off the objects just like

Is there any freeware to do this? If not, are there any simple tutorials that I can follow quickly? Thanks guys.
Question by:isaacr25
    LVL 14

    Accepted Solution

    First draw a star. Then convert it to a movie clip.  In the library, right click the properties of the movie clip of the star and export for actionscript. Also export for frame 1. Make sure the identifier is called star.

    Create another shape, the shape you want the stars to follow, for example , you draw a circle and convert it to a movie clip. Give it an instance name of obj. Tween the circle.

    Then add this code in frame 1

    var maxNegativePosition:Number = 20;
    var maxPositivePosition:Number = 80;
    var scaleNum:Number = 5;
    var scaleRotation:Number = 4;

    var star:MovieClip;

    function moveStar(starInstance:MovieClip) {
        starInstance._xscale -= scaleNum;
        starInstance._yscale -= scaleNum;
        starInstance._rotation += scaleRotation;

        if (starInstance._xscale <= 1) {

    function createStars():Void {
        star = attachMovie("star", "star"+this.getNextHighestDepth(), this.getNextHighestDepth());
        star._x = obj._x - Math.floor(Math.random() * maxNegativePosition);
        star._y = obj._y - Math.floor(Math.random() * maxNegativePosition);
        star.onEnterFrame = function() {

        star = attachMovie("star", "star"+this.getNextHighestDepth(), this.getNextHighestDepth());
        star._x = obj._x + Math.floor(Math.random() * maxPositivePosition);
        star._y = obj._y + Math.floor(Math.random() * maxPositivePosition);
        star.onEnterFrame = function() {

    onEnterFrame = function() {

    Stars will then be created at runtime and follow your circle or whatever object you created.
    LVL 19

    Assisted Solution


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    HOW TO CREATE A WEB 2.0 IMAGE WITH A REFLECTION I would like to start by saying I know Web 2.0 isn't a style. It is actually the practice of information sharing or  collaboration on the Web. It is also associated with the technology that is used …
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now