PDA

View Full Version : Line Alpha



buddylee
October 22nd, 2002, 10:42 PM
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?

lostinbeta
October 22nd, 2002, 11:59 PM
Try this...

Put this on the clip that has the instance name "vertical"


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.

sbeener
October 23rd, 2002, 12:11 PM
that's "==" to test, not "=".

andr.in
October 23rd, 2002, 01:17 PM
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