Jump to content

Swapping a single image and a group


iceherosubzero
 Share

Recommended Posts

Hello All,

 

I have a single image sprite say A (which is not in any group) and a few (3) other image sprites (in a group) say B.

 

A's depth is below B's depth.

 

My question is -> when I drag A I have kept its input.enableDrag set to (false,true) so that it is brought to the top when dragged.

 

Now when I make the B visible=true. The A's is shown over the B's 

 

How can I change A's depth when B is visible so that A is again below B's depth.

 

I tried swapChildren and getChildIndex but I am unable to swap a Image with a Group.

 

Any help would be great.

 

Thanks 

iceheros :)

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...