Is it possible replacing image with display.newImage() API?

I have some doubts about this API, display.NewImage() . Can someone help me?
 

I wrote this code:  
my variables are: “nombreCat” and “idPal” for changing image 
imagen = display.newImage( nombreCat…"/img/img_"…idPal…".jpg", 50, 80 )

imagen.anchorX, imagen.anchorY = 0, 0

imagen.width, imagen.height = 180, 200 

I want to change image but I would like using same variable "imagen", because I want my new image appears on the same position, replacing previous image. Is it possible changing only the filename? or is it necessary declare all properties again? 

Regards!

Hi @nailea.dn,

Please read this tutorial, which should help you with this process:

http://coronalabs.com/blog/2013/11/26/tutorial-techniques-for-swapping-images/

Best regards,

Brent

Thank you very much @Brent Sorrentino

The tutorial was so useful, its exactly what I want to do :slight_smile:

By the way do you have support in spanish?

Have a nice day!

Hi @nailea.dn,

Happy to help with your issue. :slight_smile:

For support in Spanish, you may wish to post requests to the Spanish sub-forum as well:

http://forums.coronalabs.com/forum/558-corona-en-español/

Best regards,

Brent

Hi @nailea.dn,

Please read this tutorial, which should help you with this process:

http://coronalabs.com/blog/2013/11/26/tutorial-techniques-for-swapping-images/

Best regards,

Brent

Thank you very much @Brent Sorrentino

The tutorial was so useful, its exactly what I want to do :slight_smile:

By the way do you have support in spanish?

Have a nice day!

Hi @nailea.dn,

Happy to help with your issue. :slight_smile:

For support in Spanish, you may wish to post requests to the Spanish sub-forum as well:

http://forums.coronalabs.com/forum/558-corona-en-español/

Best regards,

Brent