| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Feb 2001
Posts: 11
|
Hello,
I would like to build a program which allows the user to choose a specific, font, font size and it’s color. I am able to change color and size through modifying the related mc with actionscript, however, I got stuck with the font. Any help would be appreciated. Menno |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
I don't think changing the font is possible unless you have generator.
Well that's not quite true. If you wated to use one of say, 5 fonts. You could create 5 text fields, one for each font, which have all the font faces embeded in them for their particular font. Then you could have the user select their font (from the possible 5) and set a variable 'font' equal to whichever number they pick (say 3). Then (i'm assuming you're going to use duplicate movie clip or some such to do dynamic text), you go ahead and duplicate your target movie clip, which in this case would be the 3rd clip (call it 'font3') as the user sleected font 3.... Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2001
Posts: 11
|
Thanks, this will work. not completly the way I wanted it but it should be OK. I'am currently also looking into modifying a textfield through html as this should allow me to set the color, fontsize and font as well however, I wonder if I can control them through the use of a variabel.
In that case the user will choose his desired font and this font will be updated in the specific html tag which in return will change the font in the textfiled. Menno |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
I didn't think you could define the font face in a Flash text field, since you've already set the font for that text field within Flash... lemme know if you get it working...
Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Feb 2001
Posts: 11
|
Hello Jesse,
I have tried to manipulate the font through HTML I did the following. 1) Created one text field with several different fonts. Settings: dynamic, embed, html. 2) Edited the FONT tag in the following HTML line _root.veffect10.font:letter = "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial Black\" SIZE=\"80\" COLOR=\"#CCCCCC\"><B>Massa</B></P>"; Color, align, size were working nicely. Font was only working for a few selective fonts and to be honest I have really no clue how I can control them or can make variables so I shelved the idea of doing it through HTML and have started working on the creation of several Text field (each with a specific font) The problem that I encountered with this is that I somehow need to update :letter from the main menu in the following path _root.veffect10.font:letter. I am able to update the content (read text) of :letter from the main menu. but replacing the entire text field with another text field is a bit problematic for me. Do you think you can help me out on this? Menno |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
:letter indicates a variable. Are you having trouble updating your variable or manipulating the physical text fields? Have you seen this tutorial http://www.actionscripts.org/tutoria...pt/index.shtml ?
It might be of use.... Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Feb 2001
Posts: 11
|
I only have a problem to change the font (from times to verdana) property. updating the text is no problem same for size and color.
I am simply not able to copy the font from one textfield to another. I am afraid that also the duplicate mc is not going to work as I duplicate the texfield with the embedded font, which is my main problem. Menno |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
You said:
"I am able to update the content (read text) of :letter from the main menu. but replacing the entire text field with another text field is a bit problematic for me." I don't get you. Are you saying that you want to take an existing text field (in say Arial with the text "abc" in it) and swap it with another text field, with a different font but showing the same text (ie. change it to a field in Times which also says "abc")? Is that what you're trying to do? Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Feb 2001
Posts: 11
|
yes, that's it.
|
|
|
|
|
|
#10 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
Well the best way to do that would be to have each of your fonts (say 5 total) embedded into a field and put that field within an MC. Then you name the MCs 'font1', 'font2' etc.
Let's assume your text field variables are all called 'text' so their paths would be _root.font1:text, _root.font2:text , etc. So to switch between font1 and font3 all you have to do is: tmp_x = _root.font1._x; tmp_y = _root.font1._y; _root.font1._visible = false; _root.font3:text = _root.font1:text; _root.font3._visible = true; _root.font3._x = tmp_x; _root.font3._y = tmp_y; That should work a charm. You could even do it dynamically, with a variable called 'currentFont' and a variable called 'targetFont' for example, then you can substitute in the variable values above... Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| embed fonts for dynamic text | sebnewyork | ActionScript 2.0 | 5 | 10-10-2007 02:45 PM |
| wmode makes non latin fonts look strange in dynamic & input text | Nikos | Flashants Support Forum | 1 | 01-08-2007 03:08 PM |
| one dynamic Textfield and two colors or embedded fonts? | dexter_one | ActionScript 2.0 | 6 | 09-22-2006 12:10 PM |
| MX shared fonts & dynamic text problem | jcgodart | ActionScript 1.0 (and below) | 25 | 07-05-2004 10:08 PM |
| Dynamic Text vs Static Text and embedded fonts | philip | ActionScript 1.0 (and below) | 4 | 07-01-2001 01:11 PM |