How do I take the data input from textfield and have it update an object’s value?
color = display.newRect(0,0,display.contentWidth,display.contentHeight)
color:setFillColor(200,200,200)
local function set\_g( event )
if ( "submitted" == event.phase ) then
native.setKeyboardFocus( nil )
end
end
field\_g = native.newTextField( display.contentWidth\*.50, display.contentHeight-50, 15, 30, set\_g )
field\_g.font = native.newFont( native.systemFontBold, 15 )
field\_g.inputType = number
field\_g.text = 200
field\_g:setTextColor( 192, 192, 192)
I want color’s background to be changed to the field’s input, I don’t know how to arrange the code where it can set the fill color. [import]uid: 7467 topic_id: 5634 reply_id: 305634[/import]