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
New Developer
Posts: 60
Registered: ‎12-21-2008
My Device: Not Specified

Re: how to set background for container

oh, and I am using adobe flash builder 4

Highlighted
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: how to set background for container

hey jzou,

 

in order to get the image to work, you place it into the directory where you point the method to. so for instance, say you have a directory named 'images' under your src folder (root project folder where your default package is located). and the image name is myimage.jpg.

 

the code to load that image into the Image object is:

 

appBackgroundImage.setImage(File.applicationDirectory.resolvePath('images/myimage.jpg').url);

 

hope that clears things up. good luck!

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
New Developer
Posts: 60
Registered: ‎12-21-2008
My Device: Not Specified

Re: how to set background for container

yes, it works now, Thanks