Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-18-2001, 12:57 PM   #1
menno
Registered User
 
Join Date: Feb 2001
Posts: 11
Default

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
menno is offline   Reply With Quote
Old 02-19-2001, 12:58 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 02-19-2001, 02:04 AM   #3
menno
Registered User
 
Join Date: Feb 2001
Posts: 11
Default

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
menno is offline   Reply With Quote
Old 02-20-2001, 05:00 AM   #4
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 02-21-2001, 10:33 AM   #5
menno
Registered User
 
Join Date: Feb 2001
Posts: 11
Default

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
menno is offline   Reply With Quote
Old 02-21-2001, 11:15 PM   #6
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

: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.
Jesse is offline   Reply With Quote
Old 02-23-2001, 04:17 AM   #7
menno
Registered User
 
Join Date: Feb 2001
Posts: 11
Default

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

menno is offline   Reply With Quote
Old 02-24-2001, 06:47 AM   #8
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 02-24-2001, 07:57 AM   #9
menno
Registered User
 
Join Date: Feb 2001
Posts: 11
Default

yes, that's it.
menno is offline   Reply With Quote
Old 02-25-2001, 12:02 AM   #10
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 11:40 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.