Here's one way, Paul: You'll need to create two SWFs for each font. One SWF will hold the font glyphs in a dynamic text field in a shared library symbol and the other SWF, the one that you load, will import these glyphs at runtime. Drag an instance of the imported library symbol onto the root timeline of the importing SWF so you can create a reference to the dynamic text field once the imported SWF is loaded by the Flash Player. Use the font in any other dynamic or input text field in your movie by calling getTextFormat() on the imported textfield to get a TextFormat object and calling setTextFormat() and setNewTextFormat() (for input text fields), using that TextFormat object, on your other text fields.
Make sense? It's a bit tricky. Also, when you load a SWF that imports a shared library item from another SWF, you have to play some tricks to ensure that the shared libary items that you are expecting are actually loaded before you try to use them. If you load a SWF that imports symbols from another SWF using a MovieClipLoader object, the onLoadInit event is fired before those shared library items are actually loaded. You'll need to either put some kind of callback on the root timeline of the loaded SWF or just create some kind of onEnterFrame or interval loop in the loading SWF to make sure what you are looking for on the root timeline of the loaded SWF is there before you try to use it. Let me know if you can get it all working. Cheers, Scott On 8/20/06, Paul Steven < [EMAIL PROTECTED]> wrote:
My application allows users to type text using a font chosen from a drop down list of fonts. I was wondering if it is possible to import the actual font at runtime rather than embedding all the fonts (there may be about 100 fonts). Hence I would have a folder containing a ttf file or swf for each font. When the user selects a font, it will load this font. Basically just don't want the user to have to download all 100 fonts when they may only use 1 of them. Thanks Paul _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

