can you help me on how to make or use textbox in Corona, using Windows OS. because, i don’t know to create one and i couldn’t find anything on the net. Next is, to make a tracing app, because my project is about preschool kids learning the alphabet. thank you!
You want to use a native.newTextField(). But here is the catch. You can’t use them on Windows. You can have them in your code but they don’t show up. There is a technical reason for this (it has to do with Microsoft now allowing native objects to share a canvas with OpenGL apps). There isn’t much we can do about it. You will have to test these on device.
As for the tracing app, there probably won’t be a specific tutorial or API to point you to. You need to learn about how to get images on the screen and how to manage touch events. There should be tutorials and such on the basics to accomplish this.
so, each time that i will try my code, i have to send it on my device? is that what you mean? in using native.textfield. because, i’m thinking if i can practice putting names inside the database, if i’m going to store names in my application.
can you help me? where to start in the tracing app? please. i’m begging you…
i’ll start on practicing touch events… thank you!
Starting there sounds like a good plan. I’m not sure what you are using the native.newTextField for. If there is a way to hard-code the data so you can build the rest of your app, then when save the input testing until you have to get that working. That should minimize your need to test on device.
The textbox is for inputting names. so i can store them to the database.
You could hard code names to to a bulk of your testing and then deal with the native text fields when you need to by doing those test builds on device. There are quite a few things that only work on devices (and Windows makes it worse) like maps, Facebook and such, and anything “native” has to be on Device with Windows.
i’m practicing the touch events right now. But, do you have any idea on how to disable newline traces in a specific area? The screen is 600 Width 1024 Height. And with that, i just want to use the center of the screen for my tracing. like just having a box for my letter to trace. idea please =)
you can look at the event.x and event.y values in your touch handler and if they are outside of the box you want (event.x < 200 for instance) then simply return from the function without doing anything.
thank you! My problem now is how will i be going to trace and tell the user that he/she has traced it correctly. Thank you Sir Rob. Here is my file.
Sir Rob, i’m thinking if i can make a table of event.x. and with that, i will compare it to the newline that i will be using.
I built a connect the dots game once and basically what I did was make each dot a touch active spot on the screen. I didn’t use display.newCiricle, but use an image for the dot with some transparency around it so it was easier for the kids fingers to touch. When the dot senses it’s being touched, then you can record that it’s been hit and when they all have been touched (or whatever rules you need to enforce) then you can move on to the next letter.
what i’m doing right now is, just using if else statements… like, if tonumber(event.x) <= 255 then so on… i’m still doubting about it… i really want to find another ways…
have you opened my files Sir?
thank you for your effort. i really appreaciate all the things that you’ve done for me… all the things that you’ve help me to understand Corona and Lua… =)
Sir, do you have a facebook account? for me, to really check you out… please.
Yes, I looked at your code, well more I looked at what you’re trying to do, which is basically a connect the dots. You could have an array of the dots that kept track of the x, y and if it has been matched and then use a basic non-physics collision detection to see if your touch event has overlapped a dot and record it being done.
can you make a example for me? please… because, all i have is ideas, but i really don’t know how to make it happen…
all i really need is a jump start sir… =)
right now, i’ve decided to use the non-physics collision Detection. but, i’m still learning right now. hope that i can learn it for just a night. so, i can start with my project. thank you Sir ROB. and BTW, you’re article was great. three thumbs up! HAHA!
i’m starting with the dragging of objects Sir.