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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Type Input in Conditional Statement

Status
Not open for further replies.
Jan 3, 2008
4
0
0
KR
If the user types "ball" in the input textfield, instance name: name_txt, I want to move to the next frame and stop. Can somebody tell me, what I am doing wrong here? Thank you!

submit_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
{
if(name_txt.text == "ball")
{
gotoAndStop(2);
}
}
 
thank you.

I had to put a stop() on the first frame :)
This is my first time learning programming so it is frustrating to get stuck for days on such a simple problem, but then I guess you learn a lot thinking it is everything else!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top