Solved

Dynamically load fonts and alter text

Posted on 2006-06-26
5
235 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
ID: 16988522
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
ID: 16988574
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
ID: 16989745
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 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

25 Experts available now in Live!

Get 1:1 Help Now