Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
12-12-2012 12:12 PM
We all have seen textures or commonly say images set as background for apps. In my app I need to set an image as it's background. I did look into BB 10 documentation but I couldn't find anything useful. If anyone have any idea please share it. Thanks in advance.
Solved! Go to Solution.
12-12-2012 12:32 PM - edited 12-12-2012 12:42 PM
Could you please explain with code that will be more helpful.. In my code there is
[SWF(width = "somevalue", height="somevalue", background="#fffff")]
In place of that colour code i tried loading my image source like 'background = "image/one.png" ' but it ended up in error.
Thanks in advance.
12-12-2012 01:53 PM
You could use a 9 slice scaled image for multiple resolutions.
[Embed(source="assets/Book_background.png", scaleGridTop="14", scaleGridBottom="17", scaleGridLeft="1", scaleGridRight="767")]
private var background : Class; private var myBG:Sprite = new background(); myBG.width = stage.stageWidth; myBG.height = stage.stageHeight; addChild(myBG);
12-12-2012 01:56 PM
[Embed(source='assets/bg.jpg')] private var bg_img : Class; private var bg : Image = new Image(); ... this.bg.setImage( new bg_img() ); this.addChild( this.bg );
This assumes the resource is sized properly. Like the idea to have it scale to fit, but some backgrounds may not look good if scaled too much.