# Setting alpha on a black box .. graphics

**URL:** <https://forum.kirupa.com/t/setting-alpha-on-a-black-box-graphics/252631>\
**Category:** Uncategorized\
**Created:** [February 21, 2008, 8:58pm UTC](https://forum.kirupa.com/t/setting-alpha-on-a-black-box-graphics/252631 "2008-02-21T20:58:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipip](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/philipip/32/1231_2.png) [@philipip](https://forum.kirupa.com/u/philipip)\
**Post date:** [February 21, 2008, 8:58pm UTC](https://forum.kirupa.com/t/setting-alpha-on-a-black-box-graphics/252631/1 "2008-02-21T20:58:55Z")

</div>

Hy,

can enyone tell me why the alpha on this either is 0 or 100, even when I tell the object to be 13% either in the beginfill or in alpha method, it shows 100%. When i set alpha method to 0 it is 0, hu…:stare:

```auto

import gs.TweenLite; // http://blog.greensock.com/tweenliteas2 nice one :-)
import fl.motion.easing.*;
import flash.display.*;

/*
 * Test one
 * creating a black square from bottom up..
 */
        var fade:Sprite = new Sprite();
        fade.graphics.beginFill( 0x000000 );
        fade.graphics.drawRect( 0, 0, 2000, 2000 );
        fade.graphics.endFill();
        fade.alpha = 0;
        parent.addChild( fade );
         //TweenLite.to( fade, 1, {alpha:60} );
        var tween = new Tween ( fade, "alpha", Elastic.easeOut, 0, 60, 3, true ); 
  
/*
 * Test two
 * attching a libray mc, containing a 10x10 black square.. 
 */ 
        var blackBox = new blackBoxID();
        blackBox.width = 2200;
        blackBox.height = 2200;
        blackBox.alpha = 80;
        addChild( blackBox );
        //TweenLite.to( blackBox, 1, {alpha:60} );
        var tween = new Tween ( blackBox, "alpha", Elastic.easeOut, 0, 60, 3, true );

```
