# I don\`t understand that AS

**URL:** <https://forum.kirupa.com/t/i-don-t-understand-that-as/242011>\
**Category:** Uncategorized\
**Created:** [October 21, 2007, 12:09am UTC](https://forum.kirupa.com/t/i-don-t-understand-that-as/242011 "2007-10-21T00:09:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lexwbb](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@lexwbb](https://forum.kirupa.com/u/lexwbb)\
**Post date:** [October 21, 2007, 12:09am UTC](https://forum.kirupa.com/t/i-don-t-understand-that-as/242011/1 "2007-10-21T00:09:46Z")

</div>

please explain me, why the “code1” creates a smoother transition of alpha and “code2” doesn`t.

code1

```auto

 onClipEvent (load) {
    brems = 4;
    soa = 40;
}
onClipEvent (enterFrame) {
    y = soa-_alpha;
    setProperty(this, _alpha, _alpha+y/brems);
}

```

code2

```auto

onClipEvent (load) {
    ion = 100;
    maria = 1;
}
onClipEvent (enterFrame) {
    setProperty(this, _alpha, ion/maria);
}

```

Both codes are putted on 2 separately mc`s, that contains each ones button The first button changes the soa`s value from code1  
The second button changes the value of maria from code2.

Thank you
