# Line Alpha

**URL:** <https://forum.kirupa.com/t/line-alpha/7065>\
**Category:** flash\
**Created:** [October 23, 2002, 2:42am UTC](https://forum.kirupa.com/t/line-alpha/7065 "2002-10-23T02:42:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![buddylee](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@buddylee](https://forum.kirupa.com/u/buddylee)\
**Post date:** [October 23, 2002, 2:42am UTC](https://forum.kirupa.com/t/line-alpha/7065/1 "2002-10-23T02:42:04Z")

</div>

Ok, I am trying this idea, but I cant seem to get it to work. Here is what I am doing…  
I have one line that is going down 500 pixels with the instance called ‘vertical’. I also have a line set next to it with aplha = 0. When the vertical line going down reaches 300 pixels, I want the line which is set to 0 to set the alpha = 100. The code I am trying does not work… here is what I am putting in

onClipEvent (enterFrame) {  
if (vertical.\_height = 300) {  
this.\_alpha = 100}  
}

Seems simple enough, but the line becomes 100% alpha from the very beginning of the movie. Do I have to do anything with \_root or what?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 23, 2002, 3:59am UTC](https://forum.kirupa.com/t/line-alpha/7065/2 "2002-10-23T03:59:18Z")

</div>

Try this…

Put this on the clip that has the instance name “vertical”

```auto
onClipEvent (enterFrame) {
this._height+= 5
if (this._height >= 300) {
lineWithNoAlpha._alpha = 100}
}

```

lineWithNoAlpha will be the instance name of the line that you have set to alpha 0.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 23, 2002, 4:11pm UTC](https://forum.kirupa.com/t/line-alpha/7065/3 "2002-10-23T16:11:43Z")

</div>

that’s “==” to test, not “=”.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 23, 2002, 5:17pm UTC](https://forum.kirupa.com/t/line-alpha/7065/4 "2002-10-23T17:17:53Z")

</div>

check the flash help for the “=” and “==” symbols.  
“=” is to assign a value to a variable and “==” is to check the value of a variable
