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
Highlighted
Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Fit text in space

[ Edited ]

I have two input TextFields that will be replaced with InputText fields when I'm finished. But I have a problem. If I write too long of a word in the box, it expands beyond the screen, or if I use a fixed width, part of the text gets cut off.

 

So, is there an easy way to squeeze whatever text is entered into a fixed or variable space?

Setting the width just crops the text so it seems.

 

I really need help with this ASAP as the deadline is really close..

 

EDIT: Also, my app has many sound files, I've embeded them using:

[Embed(source="/res/Sounds/Example.mp3")] public var ExampleSFX:Class;

 

Does this mean that I don't need to bundle the actual sound files with/in my app?

 

I hope I'm not asking too many questions.

Also when I use the 'tab' key to go from field to field the fields in focus will lose its formatting completely (i.e font, size, color). Why would that happen? Hopefully this won't happen on the tablet when switching between fields.

Developer
Posts: 345
Registered: ‎03-13-2011
My Device: Playbook
My Carrier: n/a

Re: Fit text in space

 


Kai001 wrote:

 

I really need help with this ASAP as the deadline is really close..

 


If you are concerned go ahead an submit a version right now (you have less than 3 hours!) with the text getting cut off and the sound files included then fix the rest ASAP

 

Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Re: Fit text in space

Well I was really hoping to get this solved before submitting. I don't want to risk being rejected, also, the problem could be annoying to users.

Developer
Posts: 345
Registered: ‎03-13-2011
My Device: Playbook
My Carrier: n/a

Re: Fit text in space

 


Kai001 wrote:

Well I was really hoping to get this solved before submitting. I don't want to risk being rejected, also, the problem could be annoying to users.


 

I doubt you will get rejected because on piece of text is off. Also they won't look at your app for a few days for review so if you get in a new version and they don't like the first they will probably look at your newer version. 

 

But if you don't submit on time you are almost sure to not get in. 

Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Re: Fit text in space

Ok, well I'll just submit this if I don't solve it soon enough.

Developer
Posts: 345
Registered: ‎03-13-2011
My Device: Playbook
My Carrier: n/a

Re: Fit text in space

have you tried setting the TextInput to multiline and then set the autosize property to "left".

 

This is basically wordwrap. It isn't exactly what you want but I think otherwise you will have to watch the size and calculate how much to scale it with the xscale and yscale values.

Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Re: Fit text in space

I'll try that, also, I'm unsure of how to fill out this field:

<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
 <id></id>

 

 Do I really need to use reverse DNS? I can't just use my app name?

Regular Contributor
Posts: 75
Registered: ‎03-21-2011
My Device: None
My Carrier: T-Mobile

Re: Fit text in space

Why wouldn't you use reverse-DNS? It basically ensures that no one else is going to have the same application ID as yours. If someone is trying to find your specific app, "com.foo.Bar" has a better chance of uniquely identifying you than just "Bar".

Developer
Posts: 345
Registered: ‎03-13-2011
My Device: Playbook
My Carrier: n/a

Re: Fit text in space

 


Kai001 wrote:

 

 Do I really need to use reverse DNS? I can't just use my app name?


I think it would work but as mentioned above you should. I don't know why you wouldn't as this is an increasingly common way to do things. (Check you address bar or any java package)

 

Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Re: Fit text in space

[ Edited ]

Ok I'll do that. But do I need to uncomment and fill other fields too, like description?

 

EDIT: What about the icon fields?