I have a flash file that reads an xml file and writes the text on the flash.

The problem I have is when the client does not have the font that I'm using.
I looked on many websites and they always say you have to do the following

  1. Open the Library panel (Ctrl+L).
  2. Add a font to your library - click the options menu in the upper right corner of the panel and select New Font from the menu.
  3. In the Font Symbol Properties dialog box select the font, size and style that you want and give the font combination a name. Click OK to close the dialog box.
  4. Right-click the font symbol in the library and select Linkage from the contextual menu.
  5. In the Linkage Properties dialog box, click the Export for ActionScript button to enable both the Identifier and AS 2.0 Class text input fields. Leave the default Identifier value and click OK to close the dialog box.
  6. Select the text tool from the Tools panel and draw a dynamic text field on the Stage.
  7. Give the text field an instance name of "my_txt". In the Font menu select the symbol name you gave the embedded font earlier. You should see a little asterisk (*) beside the name.
  8. In the Property inspector set the font size and style to match those in the Font Symbol Properties dialog box earlier.
  9. Open the Actions Panel and add the following code to Frame 1 of your Flash document:

my_fmt.font = "Palatino";
new_txt.embedFonts = true;
new_txt.text = "hello world";

http://www.flash-mx.com/news/archives/000136.cfm

But this only works if you create those text fields on the flash scene.

In my case, I only have an action script that reads that xml file and writes the text on the file. I don't need to manually create those "dynamic" text fields.

Any help would be appreciated.

Questions:

1. Why do you need this specific font?

2. Why not just designate a commonly available font as a substitute?

3. Can you capture the image of your text in the font you want, and display the image instead? With a .gif file, you can even make the background transparent.

Questions:

1. Why do you need this specific font?

2. Why not just designate a commonly available font as a substitute?

3. Can you capture the image of your text in the font you want, and display the image instead? With a .gif file, you can even make the background transparent.

Our clients have their own fonts. So I can't just use any font.

If your client has its own font, then nobody else will be able to see it.

The .gif method is the only practical method. Or you can include the font in the recorded flash video through video editing.

The problem is that the browser can't see any font files on the server, It can use only the font files the owner has installed. So the font must be rendered before the files are set to the client computer. This means an image must be sent to the client computer.

It is a security violation to try to install a font to a computer without the owner's permission. The font files are not yours to access.

If your clients insist, and succeed at doing what they want, a few years in prison might convince them that they have no right to do this.

Use an image file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.