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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Carrier: Rogers
Accepted Solution

Rotating Label makes it disappear?

I'm trying to add a label to my app on an angle (or even sideways) but when I put in the following code the label disappears:

 

 

var label:Label = new Label();
			label.text = "label";
			label.setPosition(100,20);
			label.rotation = -45;
			label.format = new TextFormat("bbarial", 18 , 0xffffff);
			this.addChild(label);

 If I take out the rotation it adds the label fine. But once I put the label.rotation code in it disappears.

 

Any suggestions?

 

Thanks!

 

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Please use plain text.
Developer
fnicollet
Posts: 85
Registered: ‎10-25-2010

Re: Rotating Label makes it disappear?

Hi,

it's a classic FP "issue" (not really an issue as it is in the docs). You have to embed the font to be able to rotate / apply alpha to a text. You can find multiple example on how to embed fonts online

Hope this helps,
Fabien

--
1. If you liked my post or found it useful please click on the white star and provide a Kudo!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!
Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: Rotating Label makes it disappear?

Applying alpha is a simulator issue.  Changing font alpha works fine as an AIR application.  It is a submitted BB "issue".  There is a thread for a work around on the font alpha with blending it with a Sprite.

Please use plain text.
Developer
TheDarkIn1978
Posts: 409
Registered: ‎12-10-2010
My Carrier: N/A

Re: Rotating Label makes it disappear?

 


fnicollet wrote:

Hi,

it's a classic FP "issue" (not really an issue as it is in the docs). You have to embed the font to be able to rotate / apply alpha to a text. You can find multiple example on how to embed fonts online


interesting!  i had no idea about this.  good to know.

 


PlayBook Applications:
Drop Swatch
Please use plain text.