Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
DataSafe Xtra for Authorware and Director
Drag&Drop Xtra
Install QuickTime
Ceiling and Floor
Saving Global Variables to a File
Fade till done
Resolution Xtra
XML Text Renderer v1.1
Wait for a MouseClick or Keypress
Sound 2 CuePoint
 

 

 

Behavior Clear Embedded Font

Added on 12/7/2005

 

Compatibilities:
behavior D8_5 D9 Mac PC Script

This item has not yet been rated

Author: Chunick (website)

The script will clear any or all embedded font members specified. This should be placed in a movieScript.

-- place in a moviescript and call from the message window

on clearEmbeddedFonts (fontName)
castCount = the number of castLibs
repeat with j = 1 to castCount
memCount = the number of members of castlib j
put memCount
repeat with k = 1 to memCount
if member(k, j).type <> #font then next repeat
Case fontName of
#all:
member(k, j).erase()
otherwise
if member(k, j).font = fontName then member(k, j).erase()
end Case
if the paramCount = 2 and param(2) then
msg = "deleted font member" && k && "from castLib" && j
alert(msg)
end if
end repeat
end repeat
end

-- you can pass these parameters:

-- param 1 : either the name of the font, for example "Arial *" or #all
-- param 2 : either 1 (True) or 0 (False) to provide an alert msg to indicate the member that was erased.

-- eg.
-- from message window:
-- clearEmbeddedFonts("Arial *", 0) -- with no alert
-- clearEmbeddedFonts("Arial *", 1) -- with an alert
-- clearEmbeddedFonts(#all) -- clears all the fonts with no alert

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail