Ad:
 
Similar Threads
Jan 25th, 2008
0

Embed font in flash

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michael.ngobeni is offline Offline
20 posts
since Dec 2006
Jan 25th, 2008
0

Re: Embed font in flash

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.
Reputation Points: 692
Solved Threads: 175
Nearly a Senior Poster
MidiMagic is offline Offline
3,298 posts
since Jan 2007
Jan 28th, 2008
0

Re: Embed font in flash

Click to Expand / Collapse  Quote originally posted by MidiMagic ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
michael.ngobeni is offline Offline
20 posts
since Dec 2006
Jan 28th, 2008
0

Re: Embed font in flash

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.
Last edited by MidiMagic; Jan 28th, 2008 at 9:42 pm.
Reputation Points: 692
Solved Threads: 175
Nearly a Senior Poster
MidiMagic is offline Offline
3,298 posts
since Jan 2007
Aug 21st, 2009
0

Re: Embed font in flash

Hi!

In this web page, there are many font embedding tutorials about many controls and components from ActionScript:

http://sites.google.com/site/superco...e/actionscript

Cheers,
Fuego
Reputation Points: 10
Solved Threads: 1
Newbie Poster
fuego2008 is offline Offline
13 posts
since Aug 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: How to intregrate javascript code of selecting dropdownlist item from a asp.net form?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Ajax dropdown getelementbyid ie trouble





About Us | Contact Us | Advertise | Acceptable Use Policy
Build Custom RSS Feed


Follow us on Twitter


© 2010 DaniWeb® LLC