# Attaching multiple movie -- memory problem

**URL:** https://forum.kirupa.com/t/attaching-multiple-movie-memory-problem/169486
**Category:** flash
**Created:** [November 16, 2005, 5:07pm UTC](https://forum.kirupa.com/t/attaching-multiple-movie-memory-problem/169486 "2005-11-16T17:07:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![superprg](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@superprg](https://forum.kirupa.com/u/superprg)
#### Post date: [November 16, 2005, 5:07pm UTC](https://forum.kirupa.com/t/attaching-multiple-movie-memory-problem/169486/1 "2005-11-16T17:07:50Z")

</div>

Hi everyone  
I am getting strange problem in Flash

I am on this frame where I am drawing graph inside scrollpane.  
I am drawing each point after 1 second interval using setInterval.  
When the graph has run for more than 3 minutes and I switch to other frame using “Start New” it takes 5 or more seconds for flash to do so.  
By this time Task manager shows using more than 98% memory  
Is it because the movieclips inside the frame where graph is drawn is not destroyed? If yes, how can I do that?  
Also, can I set the scrollpane content to be empty at the press of the button?

When I commented this function the graph is running fine and also next frame comes up in a flash when I click on Stop simulation

function TooltipButton(positionX, positionY, number\_buttons,message)  
{  
var sp = pane\_sp.getScrollContent();  
var tooltip\_message:String;  
sp.attachMovie(“toolTip\_Button”, “button\_”+number\_buttons, number\_buttons);  
sp[“button\_”+number\_buttons]._height = 10;  
sp["button_"+number\_buttons]._width = 10;  
sp["button_"+number\_buttons]._x =positionX;  
sp["button_"+number\_buttons]._y = positionY;  
tooltip\_message="Series "+message;  
attachToolTip(sp["button_"+number\_buttons],tooltip\_message);  
}  
So, the main culprit here is this function  
Is there anything I can do to avoid so much memory usage and time taken by flash to switch to other frames?  
Also, is there any way I can print the name of all the movieclips being created by my program?  
Thanks for any suggestions
