Solved

Dynamically load fonts and alter text

Posted on 2006-06-26
5
222 Views
Last Modified: 2013-12-03
I'd like to have a Flash file on my website that can dynamically load a font file, as well as allow the user to type in whatever they wish using the font they choose. I would of course also need to be able to export those variables in some way shape or form. Whether it's an XML file or a POST to my PHP script (I'd love it if I could do this with no security warnings in Flash).

For an example of what I am talking about, take a look at http://stickerjunkie.com. You can type in whatever you like, and you can change the font by clicking the little arrows on the right, which gives you a nice selection of fonts.

Are there any tutorials available or anything someone can point me to in order to figure this one out? I am using Flash MX/6 but I will upgrade to a higher version if needed.

Thanks!
0
Comment
Question by:MaybeItsJeremy
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
muxxter earned 500 total points
Comment Utility
Here's what I use to assign a font to a textbox/list/combobox/whatever:

<objectInst>.setStyle("fontFamily", "<font name>");

However, <font name> has to be the name of a font in the library, or a system font.

Cheers
MuXx
0
 

Author Comment

by:MaybeItsJeremy
Comment Utility
Thanks for the reply. So are you saying Flash won't have a problem dynamically loading a font that is stored on my server?
0
 
LVL 7

Expert Comment

by:muxxter
Comment Utility
As long as it's a system font. (ie. It's listed in "C:\WINDOWS\Fonts") If this is the case then Flash will have no problem with it at all. I do it in my programs quite often.

MuXx
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now