# Altering the alpha of the member of an array

**URL:** <https://forum.kirupa.com/t/altering-the-alpha-of-the-member-of-an-array/327326>\
**Category:** flash\
**Created:** [February 22, 2012, 1:39am UTC](https://forum.kirupa.com/t/altering-the-alpha-of-the-member-of-an-array/327326 "2012-02-22T01:39:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [February 22, 2012, 1:39am UTC](https://forum.kirupa.com/t/altering-the-alpha-of-the-member-of-an-array/327326/1 "2012-02-22T01:39:32Z")

</div>

I want to set all the movieclips that belong to the objects in an array to .5 .  
The array is enginesForSale.

```auto
for (var i:Number = 0; i < _model.enginesForSale.length; i++)                        
{
       var callName:String = _model.enginesForSale*.name;
     [COLOR=#0000cd] // at this point callName would be set to "hE1"[/COLOR]
        //_model.enginesForSale*.alpha = .5;[COLOR=#0000cd]//this is talking directly to the object rather than the movieclip
[/COLOR]
           [COLOR=#0000cd]//put this part in cause i'm getting the null object reference[/COLOR]
        if (_model.enginesForSale* != null)
          {
                    trace("v752 alphaDown");[COLOR=#0000cd]//this traces[/COLOR]
          
                    asBaseScreen.getChildByName(_model.enginesForSale*.name).alpha = .5;   
              [COLOR=#0000cd]//this still gets null object error  
// if i did this directly it would say asBaseScreen.hE1.alpha=.5;
[/COLOR]
           }
                        
}

```
