# AS3 help needed

**URL:** <https://forum.kirupa.com/t/as3-help-needed/310148>\
**Category:** flash\
**Created:** [June 2, 2010, 8:10pm UTC](https://forum.kirupa.com/t/as3-help-needed/310148 "2010-06-02T20:10:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandroy](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@alejandroy](https://forum.kirupa.com/u/alejandroy)\
**Post date:** [June 2, 2010, 8:10pm UTC](https://forum.kirupa.com/t/as3-help-needed/310148/1 "2010-06-02T20:10:35Z")

</div>

I bet this is simple as hell, but I can’t figure it out since I’m kinda new to AS3. Basically I created two movieclips. The first one, named main\_menu, holds several mc buttons in a for loop . The other one, named map\_mc, holds a map which has several movieclips, with the alpha property set to 0. This movieclips are named map\_hlight1, map\_hlight2 and so on. Using tweenMax, what I want is to both add a glow filter to the buttons thenselves and change the alpha property of the map\_hlight mc’s inside map\_mc without having to individually add listeners to the buttons. I accomplished the former but not the later. Here is my code

```auto
stop();
import com.greensock.TweenMax;
import com.greensock.easing.*;
//buttons rollover & out
for (var i:Number=1; i<12; i++) {
    main_menu["button"+i].buttonMode=true;
    main_menu["button"+i].addEventListener(MouseEvent.ROLL_OVER, overHandler);
    main_menu["button"+i].addEventListener(MouseEvent.ROLL_OUT, outHandler);
    function overHandler(evt:MouseEvent) {
        TweenMax.to(evt.target, .75, {glowFilter:{color:0xFFFFFF, alpha:0.8, blurX:10, blurY:10, strength:1, quality:3}, ease:Back.easeOut});
        TweenMax.to(this.map_mc["map_hlight"]+i, .75, {alpha:1, ease:Back.easeOut});
    }
    function outHandler(evt:MouseEvent) {
        TweenMax.to(evt.target, .75, {glowFilter:{color:0xFFFFFF, alpha:0, blurX:0, blurY:0, strength:0, quality:1}});
        TweenMax.to(this.map_mc["map_hlight"]+i, .75, {alpha:0, ease:Back.easeOut});
    }
}

```

When I test my movie, i get the following error from tweenMax:

Property alpha not found on Number and there is no default value

So I’m guessing my code is not been applied to the instance name [“map\_hlight”]+i, but to the number in the “i” variable.

Any help will be greatly appreciated

Cheers!
