# Removing array's

**URL:** <https://forum.kirupa.com/t/removing-arrays/269076>\
**Category:** Uncategorized\
**Created:** [August 22, 2008, 7:01am UTC](https://forum.kirupa.com/t/removing-arrays/269076 "2008-08-22T07:01:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shannonhochkins](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@shannonhochkins](https://forum.kirupa.com/u/shannonhochkins)\
**Post date:** [August 22, 2008, 7:01am UTC](https://forum.kirupa.com/t/removing-arrays/269076/1 "2008-08-22T07:01:41Z")

</div>

hey, i have an array with a 3d like carasel menu, which is also in an array but thats not the problem, when ever i click on another button which is linked to different frames, the carasel array is still loaded, i have searched google for a remove array protocall but had no luck

here us the current as 2.0

stop();  
var total:Number = 6;  
var label\_list:Array = new Array( “1”, “2”, “3”, “4”, “5”, “6”);  
var radiusX:Number = 200;  
var radiusY:Number = 60;  
var centerX:Number = 0;  
var centerY:Number = 110;  
var speed:Number = 0.005;  
tn\_group\_mc.\_visible = false;  
info.text = “”; fm\_label.text = “”;

for( var i = 0; i \< total; i++)  
{  
var t = tn\_group\_mc.duplicateMovieClip(“tn”+i, i);  
t.tn\_mc.gotoAndStop(i+1); t.tn\_shadow\_mc.gotoAndStop(i+1);  
t.fm\_label = label\_list\*;

```
t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;

t.tn_mc.onRollOver = function()
{
    fm_label.text =this._parent.fm_label;
}
t.tn_mc.onRollOut = function()
{
    info.text = ""; fm_label.text = "";
}

```

}  
function mover()  
{  
this.\_x = Math.cos(this.angle) \* radiusX + centerX;  
this.\_y = Math.sin(this.angle) \* radiusY + centerY;  
var s = this.\_y /(centerY+radiusY);  
this.\_xscale = this.\_yscale = s\*100;  
this.angle += this.\_parent.speed;  
this.swapDepths(Math.round(this.\_xscale) + 100);

}  
this.onMouseMove = function()  
{  
speed = (this.\_xmouse-centerX) \* 0.0001;  
}  
i think that with the array remove thing that i used worked the first time but only removed the text, 1 2 3 4 5 6, it didn’t remove the icons that are loaded in tn\_group\_mc, which contains 6 icons all on sperate layers, which is what the total:6; variable up the top is for, but i cant work out how to unload the icons, any help would be awsome…

cheers.  
shannon
