3/26/2011 8:17:58 AM
Title:
datagrid
I have use a datagrid component in my fla, which is published to stretch to whatever resolution the viewer has.
But this makes my datagrid text very distorded.
How can I make it crispy looking after it is resized?
3/27/2011 10:35:53 AM
The stretched text in flash can be made to look smoother if you are using embeded fonts . It should not look that bad . Can you share the screenshot of your application. So I can suggest you proper solution.
3/27/2011 10:59:56 PM
Thanks for reacting, Rex.
Here is a screenshot:
http://www.codobyte.com/problem/problemDatagrid.jpg
3/28/2011 12:41:40 AM
Embedding the fonts in datagrid should work here. You can use the following code to apply embedded fonts in datagrid component using flex or flash builder.
<mx:Style>
@font-face {
/*you can use your own font type here like arial , verdana etc. The font file should be placed in the assets folder*/
src: url("assets/LucidaSansRegular.ttf");
fontFamily: LucidaSansRegular;
cff: false;
}
mx|DataGrid {
fontFamily: LucidaSansRegular;
textInputStyleName: myTextInput;
}
</mx:Style>
If still it does not work then you have to increase the row height by some pixels to fix this.
3/28/2011 12:46:45 AM
I have to do this in Flash CS3/AS3.
I load the datagrid component with a class.
Can you tell me how to do it in this setting?
3/28/2011 2:21:03 AM
you can check this article explaining how to embed fonts in flash CS3 for datagrid component
http://blogs.adobe.com/pdehaan/2008/02/using_embedded_fonts_with_the_1.html
3/28/2011 4:04:40 AM
And through your link I found this one:
http://actionscriptexamples.com/2008/03/10/using-embedded-fonts-with-the-datagrid-control-in-flash-cs3/
Thanks again, Rex!