header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Cor
Points:0
Posts:0
Answered

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?



1
Rex
Points: 1280
Posts:0
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.

2
Cor
Points: 0
Posts:0
3/27/2011 10:59:56 PM



Thanks for reacting, Rex.

Here is a screenshot:
http://www.codobyte.com/problem/problemDatagrid.jpg

3
Rex
Points: 1280
Posts:0
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.

4
Cor
Points: 0
Posts:0
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?

5
Rex
Points: 1280
Posts:0
Accepted Answer
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

6
Cor
Points: 0
Posts:0
3/28/2011 2:51:14 AM



THANKS!! Rex.

7
Cor
Points: 0
Posts:0
Accepted Answer
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!


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+8 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions