Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My text has disappeared 1

Status
Not open for further replies.

maxelcat

Technical User
Oct 19, 2006
79
Dear All

I have a text component which I have linked to an external sytle sheet and a text file (all located in the same folder).

I convereted the text component to a movie clip so that I could have it coming in from the side of my file. This all worked fine and dandy.

I then decided that a mask would be a good idea, just ot tidy it up. I placed a mask fdirectly above the text layer and linked them.

The mc (with the component) flies in very neatly now, but the text has disappeared. In the help files I read something that gave me the idea of turning the mask into an mc but that didn't help.

You can see the offending artilce at


Press on the "About us" link

I would greately value any support

thanks

Edward
 
thanks for that

When I select the text area component and then open the component inspector there is no reference to embedding fonts.

How do I do this please?
 
I'm not sure if you can embed fonts to TextArea Component without using scripts. The way I do is like this:

Create a Font Symbol in the Library. For this example I used Arial and named it "fontArial". Make sure the Identifier is also set to "fontArial", and the Linkage is set to "Export for ActionScript" and "Export in first frame".

Code:
with (compTextArea) {
	embedFonts = true;
	html = true;
	text = "<font face='fontArial'>Text in editable text fields do not display below mask layers</font>";
}

Kenneth Kawamoto
 
Many thanks. Tried this, worked first time (very unusual!!!)

I would like to be able to access an external txt file for this component, and also a style sheet if possible.

For the sake of trying out your last post I have commented out the code that I did have before I got into the mask idea.

I tried accessing my txt file (aboutus.txt) from inside the with fn using text =...... but couln't get it to work.

Can I link to the external txt file still?

And what about the external css file?

I really appreciate you help

Code:
with (aboutus_txt) {
embedFonts = true;
html = true;
text = "<font face='fontVerdana'>Meow meow meow</font>"
}

//aboutus_txt.html = true;
//var styles:TextField.StyleSheet = new TextField.StyleSheet();
//styles.load("text_styles.css");
//aboutus_txt.styleSheet = styles;

//aboutusData = new LoadVars();
//aboutusData.load("aboutus.txt");
//aboutusData.onLoad = function(success){
//	if(success){
//			aboutus_txt.text = this.comments
//		} else trace ("error loading data")
//	}
 
Yes, you can use your external text file and CSS.

CSS:
Code:
p {
	font-family: fontArial;
}

AS - I modified your code a little:
Code:
aboutus_txt.html = true;
aboutus_txt.embedFonts = true;
var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.load("text_styles.css");
aboutus_txt.styleSheet = styles;
aboutusData = new LoadVars();
aboutusData.load("aboutus.txt");
aboutusData.onLoad = function(success) {
	if (success) {
		var str:String = "<p>";
		str += this.comments;
		str += "</p>";
		aboutus_txt.text = str;
	} else {
		trace("error loading data");
	}
};

Kenneth Kawamoto
 
thanks again

will try when I have put the children to bed!!!

I really appreciate your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top