Solved

Dynamically load fonts and alter text

Posted on 2006-06-26
5
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
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…

729 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