Abstract: alphabet app to do spelling check against dictionary, when done.
For example: if you tap on “d.png” “o.png” “g.png” the image disappears on the screen but the value should be kept, “dog” in another corner, when user click on “spelling check” to check against dictionary.
Issue: I am stuck on passing the random display of the image, translate to alphabet and touch to disappear but to keep value for spell check.
All suggestions and feedbacks are welcome, thank you.
-- define image and alphabets
local myAlphabet =
{
"a.png",
"b.png",
"c.png",
"d.png",
"e.png",
"f.png",
"g.png",
"h.png",
"i.png",
"j.png",
"k.png",
"l.png",
"m.png",
"n.png",
"o.png",
"p.png",
"q.png",
"r.png",
"s.png",
"t.png",
"u.png",
"v.png",
"w.png",
"x.png",
"y.png",
"z.png",
}
textX = 10
function selectRandom ()
local rand = math.random(#myAlphabet)
local aFile = myAlphabet[rand]
-- display X instead of Y, hence textX
local ni = display.newImage(aFile, textX, 60)
textX = 25 + textX
table.remove(myAlphabet, rand)
end
-- the number of times text dislay on screen, for tap/touch.
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
selectRandom()
[import]uid: 21304 topic_id: 5856 reply_id: 305856[/import]