PDA

View Full Version : Dynamic Text not showing up in Movie Clip


d-woo
05-26-2006, 11:04 PM
I have dynamic text which is coming from a text file.

When the text is input on the _root it displays.

When I use the same action script in a movie the text does not display when I preview it unless I embed the fonts. I can, however, see the text when I do Control>>Test Scene, just not with File>>Publish Preview>>HTML.

What made me decide to embed the fonts (file size went from 100K to 300K) was that my scroll bar was correctly appearing small, indicating that it knew that there was a lot of text to scroll. It saw the text, but did not display it in the browser.

Background Info
-----------------
I am using Flash 8 Pro.
The text is Verdana 11 pt.
The actionscript is
this.loadVariables("bio.txt");

darkzak
05-26-2006, 11:15 PM
Hard to tell what the exact problem is but here are some possible issues:
1) Dynamic text will not show up under a mask unless you embed fonts.
2) Related to #1. Dynamic text will not show up in a scrollpane unless you embed fonts.

selliott
05-26-2006, 11:45 PM
Here's a dynamic text tutorial that may help: http://www.actionscript.org/tutorials/intermediate/load_edit_save_vars/index.shtml

If you aren't looking for the entire system to update the text file, then here's the code I've used in my flash keyframe before just to bring in the text from the text file (called Ex2TextFile.txt ... in a folder called "public_html")

loadVarsText = new loadVars();
loadVarsText.load("/public_html/Ex2TextFile.txt", 0);
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.html = true;
scroller.htmlText = this.Headlines;
} else {
trace("not loaded");
}
};

Your text file would need to start off with the "Headlines="...like this:

Headlines=yada yada yada

d-woo
05-26-2006, 11:56 PM
Thanks Selliot.

Thanks Darkzak!

Yep...it was under a mask.

Wow!