Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS
Accepted Solution

Keep container above images (depth?)

Hello, I have one container and a few images. The images are added by the user - he can add as many images as he wants at any time. When a new image is added the container is no longer visible as the image is above it.

 

How do I make it so the container is always above the images? I thought this might be the z-axis but when I changed its value there were no visible results.

From,
Noah NU
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Keep container above images (depth?)

Hey,

How are you adding the images? Have u tried adding it to the container instead of the overall main application?
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
shawnblais
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Keep container above images (depth?)

addChildAt(child,0) will add a child underneath any existing display objects. addChildAt(child, numChildren-2) will add it under the current top display object.
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS

Re: Keep container above images (depth?)

Thanks

 

@JRab I am not going to add it to that existing container because the container is being used for somehting else. The images are being added to the main sprite. I will use shawnblais's solution.

From,
Noah NU