A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: duplicating my snowflake

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    377
    I made an MC with a snowflake that moves from top of screen to bottom... How would I duplacte the MC using actionscripting so that it appears all over the screen at different alpha's.. Keeping in mind that my movie is 780x450? thanks forum

  2. #2
    Owner of the ™ thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430
    here's from the Flash 5 help file :
    ====================================
    This statement duplicates the movie clip instance ten times. The variable i is used to create a new instance name and a depth.
    Code:
    on(release) {
    	amount = 10;
    	while(amount>0) {
    		duplicateMovieClip (_root.flower, "mc" + i, i);
    		setProperty("mc" + i, _x, random(275));
    		setProperty("mc" + i, _y, random(275));
    		setProperty("mc" + i, _alpha, random(275));
    		setProperty("mc" + i, _xscale, random(50));
    		setProperty("mc" + i, _yscale, random(50));
    		i = i + 1;
    		amount = amount-1;
    	}
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center