PDA

View Full Version : If Else command changing property?


shaftbond
11-28-2004, 10:45 PM
Hi. I have a variable called "funk" and four buttons (Movie Clips) that when released, change funk to a different number. I traced "funk" and it works. I then added this actionscript to a seperate Movie Clip:
onClipEvent(enterFrame){
if (_root.funk = 1){
_root.content.galleryPics.pool1._alpha = 100;
} else {
_root.content.galleryPics.pool1._alpha = 50;
}
}

(pool1 is the first of the four buttons)

I want this Movie Clip to continually look for what number funk equals and adjust the alpha of each button (Movie Clips) accordingly, but once I add this code, when I trace "funk" it always stays "1", even when I push the other buttons. If I delete it, I can change it again by pushing the different buttons. Can someone see something I'm doing wrong? Thanks!

friz2002
11-28-2004, 10:57 PM
if (_root.funk == 1)

should work

shaftbond
11-29-2004, 01:43 AM
it sure does! thanks! i owe you one, not that i could help you with flash, but if you need a kidney or something... :)