i have a button that has an if statement on it so when clicked it makes a contact box appear (note this is all in the same fla file, not a new browser window). i tried writing another if statement so that if you click the button again, the contact box will close but it isnt working. the way i’m doing it so far is…i have set up the contact box movie clip to have a blank keyframe on frame 1 with a stop on it, then the contact info is on frame 2 with another stop on it. here is the script that i put on the button. (the conact box is instance named “contactwin” :
on (release) {
if (contactwin._currentframe == 1) {
tellTarget (“contactwin”) {
gotoAndPlay(2);
}
}
}
on (release) {
if (contactwin._currentframe == 2) {
tellTarget (“contactwin”) {
gotoAndPlay(1);
}
}
}
i notice if i remove the second part of the script and test the file, the contact box DOES appear. However, when the second part of the script is in there, the button does nothing. anyone have any idea what im doin wrong?