It appears to work fine if you comment out the assert. I’m guessing you have other plans for this which is why you have the group at the bottom? [import]uid: 5 topic_id: 111 reply_id: 81[/import]
yes, it’s true, but the scrolling text goes down (under) the pics, and in my mind, I wanna that the scrolling text is over the pix [import]uid: 940 topic_id: 111 reply_id: 82[/import]
Ah, right. Move the text so it gets created after the image does. Is an ordering problem, your image gets put on top of the text because it was created last. Do the same with your grouping, move the image to the top as it will get loaded first that way. I believe there’s a way to change the arrangement without moving things around like that… off hand I don’t recall what it is though. [import]uid: 5 topic_id: 111 reply_id: 83[/import]
The FollowMe sample shows how that’s done. When you touch an object, it becomes frontmost.
If you have a display object ‘t’, then the following moves t to the top:
local parent = t:getParent()
parent:insert( t )
Essentially, you are reinserting ‘t’ into its parent at the highest index (the end of the children array). See pg.46 under “group:insert()” in the API Reference and also pg. 22 under “Moving Objects Forward and Backward” in the AppGuide for more info. [import]uid: 5 topic_id: 111 reply_id: 84[/import]
That will display a new rectangle in white on top of everything. Though you’re other objects will still be underneath it, though un-accessable to the user. If you’re not adding a whole lot, then I probably wouldn’t bother removing the objects. But if this is something thats going to get memory intensive then you can remove them. You can do something like this:
if mainBG then
mainBG.parent:remove(mainBG)
end
and that should remove the object from the screen. I may not have the syntax totally right but something a long those lines. But if you want to reference those objects later, I don’t believe you’ll be able to call them again. [import]uid: 5 topic_id: 111 reply_id: 93[/import]