Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button not working

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
I have knocked together two fla files from Flashkit into one to make a joint contact and tell a friend form.

It works except for one thing.

There are two buttons.

The user enters name and email details (only has to do this once for both forms) and then presses either the recommend or the contact button.

The code attached to the contact button is:

on (release) {

if ((entryvalid == "1")) {
gotoAndplay("wait");
}

else if ((entryvalid == "0")) {
contactcheck ();
}

}

The code attached to the tell a friend button is:

on (release) {
if (entryvalid == "1") {
gotoAndplay("recommend");


} else if ((entryvalid == "0")) {
contactcheck();
}
}


wait an recommend are labels.

wait is in frame 5 of the top layer

recommend is in frame 22 of the layer beneath it.

The problem is that when the recommend button is pressed for the FIRST time only, the contact form is displayed.

When the same button is placed thereafter it works OK.

The contact button works properly all the time.

Any ideas?

????
 
Try adding _root to your gotoAndPlay's... Capital "P" on "Play". No need for double "(( ))" in your if statements nor for the "else if"...

on (release) {
if (entryvalid == "1") {
_root.gotoAndPlay("wait");
} else {
contactcheck();
}
} Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top