Hello,
I have a problem with image files.
I create a display object (background) with an image file (image1.png). I make this object scroll and once it is out of the screen, I need to put it back at the top but with another image. For doing that, I use background:removeSelf() and then I display the object background with the second image file (image2.png). With this everything works fine, but once I test the game, I see that it slightly stops for some time while removing the file, and then continues. I am a bit afraid because the background is not moving smoothly.
Is there any other way to change the image file of an object?
P.S. If I don’t remove the object with removeSelf and display the image image2.png in the object directly, the first image (image1.png) does not remove (it is still displayed without movement). So I imagine it will take a lot of the device’s memory.
Thank you [import]uid: 40363 topic_id: 9848 reply_id: 309848[/import]