# Not quite working - please help!

**URL:** <https://forum.kirupa.com/t/not-quite-working-please-help/193285>\
**Category:** Uncategorized\
**Created:** [July 10, 2006, 1:30pm UTC](https://forum.kirupa.com/t/not-quite-working-please-help/193285 "2006-07-10T13:30:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claire\_murphy](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Claire\_murphy](https://forum.kirupa.com/u/Claire_murphy)\
**Post date:** [July 10, 2006, 1:30pm UTC](https://forum.kirupa.com/t/not-quite-working-please-help/193285/1 "2006-07-10T13:30:20Z")

</div>

[FONT=Courier New]Hey  
I’ve had help with this code in order for me to have reached this point. However the problem i’m having is that the objects in arrSub are not staying at 100% they are appearing when the button is pressed then on release they go again!

Any idea why?

```auto

arrName = ["awards.swf","charity.swf","publications.swf"]//the arrays for the sub menu
arrSub = [_root.main_cntr.PAGE.SUB.awards_MC, _root.main_cntr.PAGE.SUB.charity_MC, 
    _root.main_cntr.PAGE.SUB.pub_MC];
btnArray = [_root.main_cntr.btns_mc.awards_btn, _root.main_cntr.btns_mc.charity_btn, 
   _root.main_cntr.btns_mc.publications_btn];
 
for (var i = 0; i<btnArray.length; i++) {
    btnArray*.ivar = i;
    btnArray*.onPress = mypress;
}
 
function mypress(refName) {
 _root.sub_cntr._alpha = 0; 
 _root.main_cntr.main_txt._alpha = 0; 
 _root.sub_cntr.main_txt._alpha = 0 
 _root.main_cntr.PAGE.SUB.group_picMC._alpha = 0;
 _root.main_cntr.PAGE.SUB.sub_txt._alpha = 0;
 _root.sub_cntr.sub_txt._alpha = 0; 
 _root.main_cntr.btns_mc._alpha = 100;
 _root.sub_cntr.alphaTo(100,1,"easeOutCubic");
    
 for (var obj in arrSub) {
        arrSub[obj]._alpha = 0;
    }
    arrSub[this.ivar]._alpha = 100;
 _root.sub_cntr.loadMovie(refName);
    trace(arrName[this.ivar]);
}
_root.main_cntr.btns_mc.awards_btn.onRelease = function () {
 mypress(arrName[0], arrSub[0], btnArray[0] )}//calls the function to load the relevant array 
 _root.sub_cntr.unloadMovie("charity.swf", "publications.swf")//unloads the possible 2 other swf's already in sub_cntr
 _root.main_cntr.PAGE.SUB.group_picMC.alphaTo(0,1,"easeOutCubic")

```

[/FONT]
