Text Field Question

Lets say I have a text field and only numbers can be searched. When someone types in a number and clicks on a search button, the scene will go to another scene. Here is a list of number which can searched and what will come up:

Numbers:

1: Will go to a scene called red

2: Will go to a scene called blue

3: Will go to a scene called yellow

4: Will go to a scene called green

5: Will go to a scene called gray

How do I do this?

Here’s a tutorial about the composer library which is what you’ll need to go between scenes: https://docs.coronalabs.com/guide/system/composer/index.html
Also take a look at native.newTextField(): https://docs.coronalabs.com/api/library/native/newTextField.html

Thanks for the resources but I need to know how to do this in my example. I already read those guides.

The tutorials explain everything you need. You have to listen for a userInput event and read an event. value to grab the needed text. Then depending on the text, call composer.gotoScene(); with a different scene name for each one

Here’s a tutorial about the composer library which is what you’ll need to go between scenes: https://docs.coronalabs.com/guide/system/composer/index.html
Also take a look at native.newTextField(): https://docs.coronalabs.com/api/library/native/newTextField.html

Thanks for the resources but I need to know how to do this in my example. I already read those guides.

The tutorials explain everything you need. You have to listen for a userInput event and read an event. value to grab the needed text. Then depending on the text, call composer.gotoScene(); with a different scene name for each one