web design, England, Britain, UK, belgium
 

How to embed fonts in Flash - Blog - General Coding Tips for Web Design

How to embed fonts in Flash. Help for the Flash Nifties XML Flash Gallery.

Home Blog How to embed fonts in Flash

Mon

15

Feb

How to embed fonts in Flash
  • Flash

Have been using the excellent Flash Nifties XML Flash Gallery but had a devil of a job finding a simple tutorial on how to embed fonts in a Flash file.
Here are the steps and files needed to achieve this.


Open your Adobe Flash program and then open the xmlGallery.fla file provided with the xmlflashgallery.zip.


Flash Library Selection You first need to import your required font into the Library. At the top of the "Library" tab is a small select button. Click this and a menu will appear.








Flash Library New Font Select "New Font...". A Font Symbol Properties opens where you can select one of your system fonts. Give it a name then "OK" it.










Flash Library New Font Imported It is now "In the Library".
















Now we need to add the code to the Action Script as explained on the Flash Nifties site. If you press F9 the Action Script window opens and you paste in the required code from line 26.
 
myGallery.linkFormat = new TextFormat()
//assign styles
myGallery.linkFormat.font="timesnewroman" 
myGallery.linkFormat.size = 13
 

All we need to do now is export the .fla as a .swf so File->Export->Export Movie...

In the gallery .xml remember to enable the embedded fonts.
 
use_flash_fonts="true"
 

Job done! :)

xmlgalleryflash
Last Updated on Thursday, 31 January 2013 08:32
 



How to embed fonts in Flash|Blog | General Coding Tips for Web Design



How to embed fonts in Flash. Help for the Flash Nifties XML Flash Gallery.


flash, font, fonts, file, library, mygallery, export, linkformat, select, code, required, open, xml, gallery, nifties, action, opens, script, fla, job, line, explained, site, press, window, paste, assign, enable, remember, embedded, use, true, movie, swf, styles, textformat, timesnewroman, size, using, excellent

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.