View Full Version : Loading external text, fonts on a Mac...
Sakka
March 28th, 2008, 02:57 PM
Please read down a few posts for an updated version of my issue.. thank you :ch:
Sakka
March 28th, 2008, 03:15 PM
Oops! I am pretty lame... I forgot to embed the characters. I thought I had done this, that's why I was panicking. For anyone who has the same question, embed your fonts! :thumb:
Sakka
March 28th, 2008, 03:31 PM
Hmm.... but I'm still having issues. For some reason, only a few of my text fields will show up with the text. And one of them even skips some text...? Has anyone had this happen? :mu:
pixel_streamer
March 30th, 2008, 04:54 AM
in the text fields, are you using htmlText, or regular text?
these threads may help you:
http://www.kirupa.com/forum/showthread.php?t=292501
http://www.kirupa.com/forum/showthread.php?t=288982
the second link shows the technique I use: set up a font symbol in the library, then make a text format, and use that to set up your text fields.
NOTE: setTextFormat and setNewTextFormat work differently. You may need to research those methods
Sakka
March 31st, 2008, 05:14 PM
Thanks for your reply, pixel_streamer!
All seemed to be working well until just now. I'm not sure what I changed, but now the text won't show up unless I put a <b> tag around it.
I'm not using any CSS or anything-- VERY simple HTML. Only <b> and no links at all.
Here is my code for that mysterious page..
//External Text Loading
myData = new LoadVars();
myData.onLoad = function() {
//Define that the text can have HTML code in it
aboutmain_txt.html=true;
fanfun_txt.html=true;
excellent_txt.html=true;
clean_txt.html=true;
family_txt.html=true;
safe_txt.html=true;
//Tell the text boxes to load the text based on the variable
aboutmain_txt.htmlText = this.aboutmain;
fanfun_txt.htmlText = this.fanfun;
excellent_txt.htmlText = this.excellent;
clean_txt.htmlText = this.clean;
family_txt.htmlText = this.family;
safe_txt.htmlText = this.safe;
};
myData.load("text.txt");
stop();
I've never heard of setNewTextFormat but I will look into it. Maybe it's the missing key! :) Thank you! :smirk:
pixel_streamer
April 1st, 2008, 04:26 AM
You're welcome.
make sure you invoke the setTextFormat, or setNewTextFormat methods after you assign the text to the textfields.
When to use which formatting? If you're changing the text in the textfield, setNewTextFormat after assigning the string. setTextFormat fits the bill if you are assigning the text to the field once, like a static textfield.
This stuff still screws with my head, too. Watch out if your checking the boxes on your font symbol. If you want a bold font, you have to have a linked font symbol in your library with the bold option checked AND you have to invoke bold in the AS formatting. This last part may be what you missed.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.