# How to Reduce Cpu Usage while Performing Attaching MovieClips

**URL:** <https://forum.kirupa.com/t/how-to-reduce-cpu-usage-while-performing-attaching-movieclips/128061>\
**Category:** Uncategorized\
**Created:** [November 9, 2004, 6:30am UTC](https://forum.kirupa.com/t/how-to-reduce-cpu-usage-while-performing-attaching-movieclips/128061 "2004-11-09T06:30:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sundaram\_mms](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sundaram\_mms](https://forum.kirupa.com/u/sundaram_mms)\
**Post date:** [November 9, 2004, 6:30am UTC](https://forum.kirupa.com/t/how-to-reduce-cpu-usage-while-performing-attaching-movieclips/128061/1 "2004-11-09T06:30:21Z")

</div>

Hi.

I want to clarify my doubts with you peoples.

How to Control the instance of Movieclips in Flash while Performing attachMovie Operations.( i know that removeMovieClip function but when i have to use that removeMovieClipfunction without interrupting animation)

## For example:

onClipEvent(load){  
var depth=1;  
}

onClipEvent(enterFrame){

depth++;

//Stripes – is a MovieClip which is having animation in its Frame upto 10 th Frame

this.c=\_root.attachMovie(“Stripes”,“s”+depth,depth);  
this.c.\_x=100;  
this.c.\_y=150;  
}

Here i am doing the Attach Movie Function for the movieclip namely “Stripes”.If run this script then within few minutes the system takes it full usage of memory .I want to know how to reduce the cpu usage without intruppting animation.

if any one gives the idea with example then it is very useful for me thx…
