Macromedia Flash...help

Questions about programming languages and debugging
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Macromedia Flash...help

Post by ayu »

Anyone good at coding in flash?....i have been sitting all day now with my new site, and this last little function i need for it ...wont work....could anyone take a look at this code and see if i have missed something?

Code: Select all

on (keyPress "<Enter>") {
if(textbox2.text==startw){
		gotoAndPlay(190);
}
else if(textbox2.text==search){
		getURL("http://www.justbgeek.com/search/"," ","GET");
}
else if(textbox2.text==affiliates){
		gotoAndPlay(251);
}
else
	gotoAndPlay(179);
}
It's for a textbox, you enter one of the options and it does blablabla...the thing is...that it doesn't matter what i type....because whatever i type it goes along and does the first "if" ...even if i write "search".... anyway...the clock is 01:51 AM here now...and i really need some sleep.... answers would be appreciated! Thanks in advance!!
"The best place to hide a tree, is in a forest"

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Sleeping does help it seems.... i solved the problem

Solution:

Code: Select all

on (keyPress "<Enter>") {
	if (textbox2 == "startw"){
		gotoAndPlay(190);
	}
	if (textbox2 == "search"){
		gotoAndPlay(251);

	}
	if (textbox2 == "affiliates"){
		gotoAndPlay(266);
	}
}
	
"The best place to hide a tree, is in a forest"

Post Reply