# Changing alpha with AS (as included.. please look)

**URL:** https://forum.kirupa.com/t/changing-alpha-with-as-as-included-please-look/109551
**Category:** Uncategorized
**Created:** [May 6, 2004, 4:43pm UTC](https://forum.kirupa.com/t/changing-alpha-with-as-as-included-please-look/109551 "2004-05-06T16:43:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kristopher](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kristopher/32/501_2.png) [@Kristopher](https://forum.kirupa.com/u/Kristopher)
#### Post date: [May 6, 2004, 4:43pm UTC](https://forum.kirupa.com/t/changing-alpha-with-as-as-included-please-look/109551/1 "2004-05-06T16:43:06Z")

</div>

I’ve been trying to change an MCs alpha with actionscipt. the movies FPS is 30.

here’s the as:

[AS]  
onClipEvent(load) {  
var alpha = blue.\_alpha;  
alpha = 50;  
var forwardA = true;  
var changeA = true;  
}

onClipEvent(enterFrame) {  
if(changeA) {  
if(forwardA) {  
if(alpha \>= 0){  
alpha++;  
} else {  
forwardA = false;  
} // end alpha \>= 0

```
     } else {
         if(alpha &gt;= 100){
             alpha--;
         } else {
             forwardA = true;
         } // end alpha &gt;=100
     } // end forwardA
 } // end changeA

```

}  
[/AS]

whats wrong with my code? btw, “blue” is the MC that i want to change the alpha of, and this code is on that MC.
