2008
11.15

I just made a video tutorial that shows you how to:

  1. Create a swf with an embedded font.
  2. Create an application and loads that swf and pulls the embedded font from the loaded swf.

This is really simple and really smart if you need to have multiple fonts in your application.

FYI: once again for best video quality use the fullscreen button.

Dynamic Font use in Flash from Josh Chernoff on Vimeo.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Technorati
  • Blogplay
  • email
  • RSS
  • Twitter
  • Yahoo! Bookmarks

7 comments so far

Add Your Comment
  1. I believe your flash detection is faulty – I have flashplayer 10 and cannot see your video – only the alternate content. Maybe your detection script thinks we have flashplayer 1 – kinda sucks.

  2. Ow man I’m sorry, go figure that would happen if I left the default from cs4!

    I will use the swfObject asap.

    sorry guys.

    ::EDIT:: Fixed! you know what they say when you assume? you make an “ass’ of “u” and “me”
    And that what I get for assuming that CS4 knew how to embed the very software that it developed.

  3. Hey, first off: Great video! Thanks :)

    I am trying to use similar techniques to load in classes (as components) rather than load in a bunch of classes that I don’t need. I need to do this for a project at work… basically allowing our customers to create their own custom flash apps and load in certain functionality (through a user interface on our website).

    While my issue isn’t specific to loading in fonts, it does involve similarities as I am loading swf’s for their classes. The issue I am running into is that it works when I load in a swf that has a random key generation class and have the compiler set to NON-strict mode. But when in strict mode it says: 1180: Call to a possibly undefined method generateKey. generateKey is obviously a method in my loaded class (RandomKey.generateKey(_int:int))

    Would you happen to have a video or a link to tutorial that talks about loading in a class and using it much the same way as this one, but not using a font?

    thanks :)
    kevin

  4. Well, for anyone who cares my issue (stated above) stemmed from the fact that I was loading a Singleton class. From what I understand, now, the only thing you can do with a Singleton class is load it into a function as follows:

    var loadedClass:Class = e.target.applicationDomain.getDefinition(‘com.site.RandomKey’) as Class;
    var generateKey:Function = loadedClass.generateKey;
    generateKey(_vars…);

    I hope this helps someone else who might be struggling with embedded assets.

    Again, thanks for the video, it was very helpful. :)

  5. Very cool, I’m glad you figured it out. I was kinda stumped and was gonna look into it when I had free time. Sorry that I never got back to you.

    But looks like you got it all under control. Glad the video helped.

    - Josh Chernoff.

  6. Hi Thanks Josh! Nice Tutorial. I was really stuck in this. But i have one more question to ask :) that yes you are creating text field in AS file and yes it works. But can i make textField in textLoader.fla file? and apply this font to it using textformat? or we can only use this font within AS file?
    I will be thankfull.
    Bye.

  7. Hi there! no replay yet :(
    ok i figured it out myself. But i have another question that can we do it using AS 2?
    bye