Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rating: Thread Rating: 1 votes, 4.00 average. Display Modes
Old 03-30-2002, 06:44 PM   #1
Taldos
Registered User
 
Join Date: Oct 2001
Location: PA
Posts: 91
Send a message via AIM to Taldos
Default problems with embedFonts

ahoy!

am dynamically creating a textField.
ActionScript Code:
_root.createTextField("firstText", 1, 300, this._y, 300, 100); myFormat = new TextFormat() myFormat.bold = 1; _root.firstText.text = "just testing"; _root.firstText.setTextFormat(myFormat); _root.firstText.embedFonts = 1;
I am trying to do this because i want to use the _rotation option on my text field. however, if the fonts are not embed text vanishes.
but, even when i do place the embed call text still vanishes. am unsure as to what might be the problem. any ideas?

Last edited by CyanBlue; 09-20-2005 at 04:22 PM.. Reason: AS tag is applied
Taldos is offline   Reply With Quote
Old 05-10-2002, 01:03 AM   #2
blooo
Registered User
 
Join Date: Oct 2001
Posts: 2
Default

In order to use embedFonts, you first have to add the font to your library. (Add Fonts from the library menu). Then, make sure the linkage of the font is set to "Export for ActionScript"
blooo is offline   Reply With Quote
Old 05-10-2002, 02:02 AM   #3
Fade
Test 123
 
Fade's Avatar
 
Join Date: May 2002
Location: USA, Florida
Posts: 51
Default

Blooo,

I've been having the same issue as Taldos. Thanks for clearing it up for me (and hopefully him as well)!

Good luck on your proj. Taldos!

Thanks,
--FADE
Fade is offline   Reply With Quote
Old 09-14-2002, 06:41 PM   #4
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
Default

I can't get this to work properly

I have added a font to my library (checked the boxes for bold and italic as well), set its linkage name as "thaFont" and am try to use it in a text box with

Code:
_root.createTextField("newText",1,50,50,100,300);
newText.text="hi";
newText.font="thaFont";
newText.embedFonts=true;
but it ain't working

what am I doing wrong?

Thanks
__________________
Billy
Online Galleries
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 09-14-2002, 06:52 PM   #5
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
Default

ok I figured it out

the link to the font in the library has to be done within a TextFormat object

If anyone wants an example see attached

cheers
Attached Files
File Type: zip createtextfield.fla.zip (2.0 KB, 576 views)
__________________
Billy
Online Galleries
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 10-21-2002, 07:38 PM   #6
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

thanks billyt... this helped me out a bunch.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 10-21-2002, 11:32 PM   #7
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
Default

you're more than welcome
__________________
Billy
Online Galleries
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 10-22-2002, 07:21 PM   #8
dbonneville
Registered User
 
Join Date: Oct 2002
Posts: 54
Default

I'm having a similar problem. I want to do the same but draw the text box dynamically and have it be an input box, set to HTML true and display htmlText, and I can't get it to work. It just disappears. I put the font in the library, to no avail so far. Here's my code...
ActionScript Code:
//create main text box this.createTextField("typingArea1",100,-330,-100.5,659,242); typingArea1.html = true; typingArea1.htmlText = "my new text<br>and another line"; typingArea1.wordWrap = true; typingArea1.multiline = true; typingArea1.border = true; typingArea1.background = true; typingArea1.backgroundColor = 0xFFFFFF; typingArea1.autoSize = "left"; typingArea1.type = "input"; currentFormat = new TextFormat(); currentFormat.font = "Arial"; currentFormat.size = 24; currentFormat.color = 0xFF0000; typingArea1.embedFonts = true; typingArea1.setTextFormat(currentFormat);
Thanks for any help or suggestions on this. Is this an order of precedence problem?

Last edited by CyanBlue; 09-20-2005 at 04:22 PM.. Reason: AS tag is applied
dbonneville is offline   Reply With Quote
Old 10-22-2002, 07:26 PM   #9
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

if you've put your font in your library, then set up a linkage for it... use a linkage name like 'myFont'
then in your code:
ActionScript Code:
//change: //currentFormat.font = "Arial"; //to: currentFormat.font = "myFont";
and giver a whirl.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 10-22-2002, 07:46 PM   #10
dbonneville
Registered User
 
Join Date: Oct 2002
Posts: 54
Default

I put in the fonts (several of them) and gave them names, and did one as you say, "myFont". I have linkage set up to export for actionscript, first frame. I have a trace that even shows that the font name is beeing seen by flash without a problem, but yet the face on screen at runtime is still Times Roman, and jagged too, when it should be smooth.

Here is my current code:
ActionScript Code:
//create main text box this.createTextField("typingArea1",100,-330,-100.5,659,242); typingArea1.wordWrap = true; typingArea1.multiline = true; typingArea1.border = true; typingArea1.background = true; typingArea1.backgroundColor = 0xFFFFFF; typingArea1.autoSize = "left"; typingArea1.type = "input"; typingArea1.html = true; typingArea1.htmlText = "my new text<br>line two"; currentFormat = new TextFormat(); currentFormat.embedFonts = true; currentFormat.size = 50; currentFormat.color = 0xFF0000; currentFormat.font = "myFont"; typingArea1.setTextFormat(currentFormat) ///////////// trace(typingArea1._y+" right here"); trace(typingArea1._width); trace(typingArea1.backgroundColor); trace(typingArea1.text); trace(typingArea1.htmlText); trace("font = "+currentFormat.font); typingArea1.setTextFormat(currentFormat)
What on earth could still be wrong? Thanks for your eyes on this one!

Doug

Last edited by CyanBlue; 09-20-2005 at 04:23 PM.. Reason: AS tag is applied
dbonneville 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
Any one heard of problems with the flash player 7.0.14? needMoreCowBell Other Flash General Questions 1 10-22-2004 10:58 PM
Problems for customers in the Czech Republic Marianne Other Flash General Questions 4 08-24-2004 06:57 PM
wordwrap problems in a textfield caused by embedFonts TheLostMarble ActionScript 1.0 (and below) 15 08-16-2004 08:50 AM
Problems with Loading Text Into a Textbox holdaway ActionScript 2.0 6 02-03-2004 05:21 AM
levels, linkage of audio, and load movie problems to a specfic frame problems ooolie ActionScript 1.0 (and below) 0 12-05-2002 08:54 PM


All times are GMT. The time now is 09:53 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, 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.
You Rated this Thread: