update a textfield

Hi I have an array of pictures and a textfiled

When the app starts it shows the index.
Like this:
local textObject = display.newText( imageIndex, 100, 100, nil, 24 )

I want the tetxObject to update when imageIndex changes.

Can somebody help me?

Magnus [import]uid: 5717 topic_id: 758 reply_id: 300758[/import]

Assuming your function that changes your image has access to the “textObject” variable (you may need to make it global), you just do:

textObject.text = “whatever”;

The API documentation lists all this type of information.

Scott [import]uid: 5659 topic_id: 758 reply_id: 1516[/import]