Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 31st, 2006, 01:00 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default Font Problem :(

Hi,
I'm using following code for viewing some text files from outside flash, my problem if client machine don't have that font it is coming with default font, i need to show same font for them please help me.
Flash code
-----------
var textFileData = new LoadVars();
textFileData.onLoad = function ()
{
name_txt.html = true;
name_txt.htmlText = textFileData.name;
};
textFileData.load("text.txt");

text.txt
-------
&name=<a href='http://www.google.com' target='_blank'><b>google.com</b></a><br>

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com
 
Old November 1st, 2006, 02:09 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi friends,
I found the solution.
embedFonts (TextField.embedFonts property)

Example
In this example, you need to create a dynamic text field called my_txt, and then use the following ActionScript to embed fonts and rotate the text field. The reference to my font refers to a Font symbol in the library, with linkage set to my font. The example assumes that you have a Font symbol in the library called my font, with linkage properties set as follows: the identifier set to my font and Export for ActionScript and Export in First Frame selected.

var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;


surendran
(Anything is Possible)
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Font printing problem harini19 Java Basics 1 July 17th, 2006 08:04 AM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
Font problem in php ksunil Beginning PHP 0 January 30th, 2006 07:13 AM
font-size problem in CSS crmpicco CSS Cascading Style Sheets 2 August 22nd, 2005 09:31 PM
Font Problem pazzuzu Visual C++ 0 July 6th, 2005 01:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.