# Duplicate and remove movie clips randomly

**URL:** https://forum.kirupa.com/t/duplicate-and-remove-movie-clips-randomly/239028
**Category:** Uncategorized
**Created:** [September 18, 2007, 8:00am UTC](https://forum.kirupa.com/t/duplicate-and-remove-movie-clips-randomly/239028 "2007-09-18T08:00:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![php\_expert](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@php\_expert](https://forum.kirupa.com/u/php_expert)
#### Post date: [September 18, 2007, 8:00am UTC](https://forum.kirupa.com/t/duplicate-and-remove-movie-clips-randomly/239028/1 "2007-09-18T08:00:26Z")

</div>

Hi

I want to make a sparkler button that shows twinkling stars around the button in random positions.

I have made two types of stars (movie clips)

1 - twinkle: this movie clips shows a star appear and disappear with some rotating and alpha channel so the overall effect is like twinkling and revolving star.

2 - same effect star moving on a small curved path.

now I want to use action script for onMouseOver event to duplicate these two movie clips in different X Y positions (very close to each other) with a magical sound. I can do the sound part 🙂 but not the actionscript part in which i want to duplicate both clips in random positions and then remove them (if that is necessary to free the resources they are occupying) however the stars affect have a fade in and fade out effect so they disappear automatically.

any help is highly appreciated.

thank you.
