• Hi Guest: Welcome to TRIBE, the online home of TRIBE MAGAZINE. If you'd like to post here, or reply to existing posts on TRIBE, you first have to register. Join us!

Program help!

Zorro

TRIBE Member
Okay I'm writting this function.

function barAlpha(){
if(_root.bar.pink._alpha<=100){
_root.bar.pink._alpha = +5
}else if(_root.bar.pink._alpha >=100){
_root.bar.pink._alpha =100;
}

}

I want it to repeat it until it reaches 100 hundred but it's not
doing this what am i messing. Man it's been awhile since I acutally
had to do this myself.

yes I need it to repeat within the function and not with the press of a button.

I'm sure it's just an easy thing I'm missing but any help would be greatful.
 

stir-fry

TRIBE Member
_root.bar.pink._alpha = ++5

??

it's something to do with this line.
but it's been ages since i've looked at c/c++
 
tribe cannabis accessories silver grinders

Stan

TRIBE Member
No wait, he said he needs it to repeat until it reaches 100 hundred, which is actually 10,000.
 

Zorro

TRIBE Member
Originally posted by Stan
And I'm pretty sure the syntax for adding 5 to a variable is:

variablename += 5;
^^
Yeah thats right.

Plus I solved my problem.
I'm using Mx2004 so I just put it into a movieclip and an onClipEvent(EnterFrame){
loop solved my problem.
}
 
Top