Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Dynamically placed buttons (See related posts)

It's simple, yet I often forget this.

var myMC:MovieClip;
var i = 1;
var pad = 5;
while (i<6) {
        trace(" i : "+i);
        myMC.duplicateMovieClip("myMC"+i, i);
        myMC.removeMovieClip();
        this["myMC"+i]._x = this["myMC"+(i-1)]._x+(this["myMC"+(i-1)]._width)+pad;
        this["myMC"+i].onRollOver = function() {
                trace(this);
        };
        i++;
}

You need to create an account or log in to post comments to this site.


Related Posts