Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Images and Z depth
Started by WauloK Nov 08 2010 01:27 PM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

WauloK

[GLOBAL: userInfoPane.html]
WauloK
  • Contributor

  • 668 posts
  • Guests

Hiyas.

Trying to understand this and from what i gather it has something to do with groups?

If you have say a background that's static, then some in the middle and the last one for the foreground as the last thing added to the group (possibly called 'display').

If I want to change something, I have to insert between the first and last images added to the 'display' group.

Is this correct? Is this the preferred/only way to do this?

I'm guessing the sprites are non-destructive and will not destroy images drawn below as they are drawn from bottom to top over and over.

Thanks for helping clear this up.

uid: 10389 topic_id: 3505 reply_id: 303505


[TOPIC: post.html]
#2

MikeHart

[GLOBAL: userInfoPane.html]
MikeHart
  • Corona Geek

  • 1,278 posts
  • Corona SDK

When you create a display object, it will automatically added to the "Stage" group. This is the default group. You can add as many groups you need. 'Each group and its children are drawn in they order of group creation and inside the group by index:

"Stage"-Group
child1
Child4
Your first created group
Child2
Child7
Your second created group
Child3
Child5
Your thrid created group
Child 6
Child n
uid: 5712 topic_id: 3505 reply_id: 10576



[topic_controls]
[/topic_controls]