# .duplicateMovieClip to AS3?

**URL:** <https://forum.kirupa.com/t/duplicatemovieclip-to-as3/330151>\
**Category:** flash\
**Created:** [December 7, 2012, 12:09pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-to-as3/330151 "2012-12-07T12:09:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![n00bctrl](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@n00bctrl](https://forum.kirupa.com/u/n00bctrl)\
**Post date:** [December 7, 2012, 12:09pm UTC](https://forum.kirupa.com/t/duplicatemovieclip-to-as3/330151/1 "2012-12-07T12:09:05Z")

</div>

hey guys im gettting this error:

TypeError: Error #1006: duplicateMovieClip is not a function. at mopgame\_fla::MainTimeline/frame2()[mopgame\_fla.MainTimeline::frame2:9]

I was wondering if you could help me change this .duplicateMovieClip to AS3? Here’s my code:

```auto
bb.stop(); // To stop the main movie clip from flying for red balloon
gb.stop(); // To stop the main movie clip from flying for green balloon
bb.x = Math.random() *480; // Move the main movie clip of red balloon randomly on screen bottom
gb.x = Math.random() *480; // Move the main movie clip of green balloon randomly on screen bottom
/* Checking for two condition 1) Checking whether no of balloon to fly for level finished 2) No of lost balloon reaches 4
*/
if(balloon_to_fly>0 && no_of_lost<4)
{
bb.duplicateMovieClip("new",balloon_to_fly);
balloon_to_fly -= 1;
}
else
{
gotoAndPlay(38); // Bringing up the Game Over Frame
}
/* Making the good balloon is only on randomly at rare chances for which I given to find a number randomly within 10 and it was above 5 I will make a green balloon to fly*/
if(Math.random()>0.5)
{
gb.duplicateMovieClip("newgood",balloon_to_fly);
}

```

Heres the tutorial im trying to work from…im trying to convert it to AS3 : [http://developeriq.in/articles/2012/may/16/simple-game-development-for-touch-screen-mobiles-1/](http://developeriq.in/articles/2012/may/16/simple-game-development-for-touch-screen-mobiles-1/)

Cheers Jonny!
