View Full Version : html text with custom font
Billy T
11-25-2002, 10:17 AM
Does anybody know how I can load in html formatted text and display it with a custom font?
I don't think its possible but would be happy to be proved wrong...
cheers
farafiro
11-25-2002, 11:03 AM
what u mean exactly?? u wanna load an HTML pre-formated text in a flash text box or what??
Billy T
11-25-2002, 11:56 AM
yep that's right - but I don't want to use device fonts...
vosgien
11-25-2002, 02:43 PM
Hi Billy,
You can take a look at this thread, which basically concurs with your opinion that it cannot be done ( you rate a mention or two here man)here (http://www.actionscripts.org/forums/showthread.php3?s=&threadid=18743)
Something I have been playing around with, but not tested properly yet is this code :
loadVarsText = new loadVars();
loadVarsText.load("privacy.txt");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function (success){
if (success){
scroller.html = true;
scroller.htmlText = this.var1
}
}
basically, this formats the text in html after the text formatting - make sense ? so you don't lose the font, colour etc - is that what you're looking for ?
Vosgien
Billy T
11-25-2002, 03:05 PM
thanks for the reply man
so did you use that method to display html formatted text with a custom font because I couldn't get it to work
I'll try again tomorrow
Thanks again
vosgien
11-25-2002, 03:15 PM
Hi,
No, I was looking for way to include an html link in my txt file without losing custom formatting, if you looked at the thread I couldn't do it, the code above was something I found I think on these forums, but not had time to test - from what you say doesn't look like it works eh ?
Sorry can't be of more help
Vosgien
Billy T
11-25-2002, 03:24 PM
right ok
no worries
Thanks anyway
cheers
Billy,
is this wht you mean?
i use it with dynamic text from a db
hope I proved you wrong, :D
tost
i guess the trick is to have the textfield in the fla with character>embed fonts for all outlines clicked, rather then creating the field in runtime..
Billy T
11-25-2002, 09:11 PM
well I'm not sure how its working but it looks to just what I'm after :)
doesn't seem to work for bold text though
any idea why that might be?
Thanks chief
Billy T
11-26-2002, 04:20 AM
hmm no bold or italic...underline and font color work though...
strange...
farafiro
11-26-2002, 05:38 AM
I'm confused here, is that what u want??
Billy T
11-26-2002, 05:45 AM
nah has to be a custom font
Thanks anyway ;)
Billy T
11-26-2002, 05:46 AM
by that I mean a font that the user doesn't have...one that I will embed in the swf
farafiro
11-26-2002, 06:03 AM
ahuh, now I got it, and u r right, no, it can't be done for that the HTML formats doesn't allow the flash text formats (ignores it)
Billy T
11-26-2002, 06:52 AM
check out tost's file - it works for some html tags but not others :(
farafiro
11-26-2002, 07:01 AM
yeah, see all the text technotes in MM site, very usefull. I've seen them all
Billy T
11-26-2002, 07:15 AM
ya seen this one?
http://www.macromedia.com/support/flash/ts/documents/html_text_outlines.htm
too easy...see attached...
Billy,
<b> tags work just fine, as long as there's a Bold version of the font EMBEDDED also,...
put in a second textfield, set it to Yourfont Bold and embed all characters?
cheerz
tost
farafiro
11-26-2002, 07:42 AM
I've send u one like this
oh yeah, read the technote, i see.
but it IS possible when the Regular and Bold are in different font files, that makes 'em two fonts and not one family.
Billy T
11-26-2002, 09:16 AM
its all good
thanks chaps
|
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.