# Hi please help me... this is about button movie clips

**URL:** <https://forum.kirupa.com/t/hi-please-help-me-this-is-about-button-movie-clips/307623>\
**Category:** Uncategorized\
**Created:** [April 7, 2010, 3:20am UTC](https://forum.kirupa.com/t/hi-please-help-me-this-is-about-button-movie-clips/307623 "2010-04-07T03:20:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiera](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@kiera](https://forum.kirupa.com/u/kiera)\
**Post date:** [April 7, 2010, 3:20am UTC](https://forum.kirupa.com/t/hi-please-help-me-this-is-about-button-movie-clips/307623/1 "2010-04-07T03:20:58Z")

</div>

Hi, please help me i have a portfolio site.  
this is all going well until i go to the portfolio page in a new scene,  
i make an array button with a movieclip name fm\_button. the problem is after i go to the portfolio scene and if i want to go to the other scene, ex(aboutme or index) the fm\_button is still there…TT

I already tried, remove movieclip, visible false (like what i did in red color in this as) but it didnt work…  
please help me out… thanks

import mx.transitions.Tween;  
import mx.transitions.easing.\*;

fm\_button.\_visible = false;  
button\_label = new Array();  
button\_label[0] = “portfolio”;  
button\_label[1] = “1”;  
button\_label[2] = “2”;  
button\_label[3] = “3”;  
button\_label[4] = “4”;  
button\_label[5] = “5”;  
button\_label[6] = “6”;  
button\_label[7] = “7”;  
button\_label[8] = “8”;

// a number of buttons in button\_label array must be equal  
// to a number of frames inside “contents” movieclip  
var total\_page:Number = button\_label.length;  
var contents\_spacing\_x:Number = 180;  
var contents\_spacing\_y:Number = 150;  
var original\_x:Number = contents\_group.\_x;  
var original\_y:Number = contents\_group.\_y;  
var distance\_x:Number = contents\_group.contents.\_width + contents\_spacing\_x;  
var distance\_y:Number = contents\_group.contents.\_height + contents\_spacing\_y;  
var i:Number = 0;  
var j:Number = 0;  
var k:Number = -1;  
contents\_group.contents.\_visible = false;

for( ; i \< total\_page; i++ )  
{  
fm\_button.duplicateMovieClip(“fm\_button” + i, i);  
\_root[“fm\_button” + i].\_x = fm\_button.\_x;  
\_root[“fm\_button” + i].\_y = fm\_button.\_y+ i_32;  
\_root[“fm\_button” + i].label\_mc.label\_txt = button\_label_;  
\_root[“fm\_button” + i].no = i;

```
contents_group.contents.duplicateMovieClip("contents"+i, i);
contents_group["contents"+i].gotoAndStop(i+1);
contents_group["contents"+i].contents_no = i;

if( i % 3 == 0 ) { j = 0; k++; }
contents_group["contents"+i]._x = j * distance_x;
contents_group["contents"+i]._y = k * distance_y;
j++;

```

}  
function changeContent(no)  
{  
for( i = 0; i \< total\_page; i++ )  
{  
\_root[“fm\_button” + i].button\_mc.\_visible = true;  
\_root[“fm\_button” + i].graphic\_bg1.\_visible = true;  
\_root[“fm\_button” + i].graphic\_bg2.\_visible = false;  
}  
\_root[“fm\_button” + no].button\_mc.\_visible = false;  
\_root[“fm\_button” + no].graphic\_bg1.\_visible = false;  
\_root[“fm\_button” + no].graphic\_bg2.\_visible = true;

```
j = Math.round(no % 3);
k = Math.floor(no / 3);

new_position_x = original_x - j * distance_x;
old_position_x = contents_group._x;
new_position_y = original_y - k * distance_y;
old_position_y = contents_group._y;

new Tween(contents_group, "_x", Elastic.easeOut, old_position_x, new_position_x, 2, true);
new Tween(contents_group, "_y", Elastic.easeOut, old_position_y, new_position_y, 2, true);

```

}  
changeContent(0);

// this is an if statement to make fm\_button dissapear when i go to other scene, but it didnt work, should i make [COLOR=Red]fm\_button.\_visible = false[/COLOR] in the portfolio scene or other scene? any help?  
[COLOR=Red]if(intro\_btn.onRelease = function (){  
gotoAndPlay(“intro”, 0)  
}){fm\_button.\_visible = false;  
}[/COLOR]

aboutme\_btn.onRelease = function (){  
gotoAndPlay(“aboutme”, 1);  
};

portfolio\_btn.onRelease = function (){  
gotoAndPlay(“portfolio”, 2);  
};

index\_btn.onRelease = function (){  
gotoAndPlay(“index”, 3);  
};

contactme\_btn.onRelease = function (){  
gotoAndPlay(“contactme”, 4);  
};

Thanks so much for all ur help^^
