Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Volume4 webforumsuser@macromedia.com #1
Adding text to dynamic text field
When loading text from an external text file into a dynamic text field using the following Action Script:
Features_lv = new LoadVars();
Features_lv.onLoad = onText;
Features_lv.load("about_us.txt");
function onText() {
aboutus_txt.text = Features_lv;
}
The text does load successfully into the field but all spaces are displayed as '%20', does anyone have an idea why this is happening?
Thanks
Schalk
Volume4 webforumsuser@macromedia.com Guest
-
XML to dynamic text field
New to XML. This is probably basic. Trying to load titles of lessons from an XML file to individual dynamic text fields without using a component.... -
load external text to dynamic text field in levels
Dear Sir I found the Tech Noe Index #16238 is useful in creating dynamically loaded text from external text file. However, the method mentioned... -
How to center text in dynamic HTML text field ???
In Flash MX 2004 I suddenly find myself comletely helpless trying to align all text to the center in my dynamic text field. I dont recall running... -
Can you Mask a dynamic text field?
I have tried this, but the text doesn't show at all. Is it a limitation? Thanks Geoff -
Dynamic text in smooth scrolling text field - help
here's links to the files. http://www.anicespot.com/test/ http://www.anicespot.com/test/easing_textScroller-01.html... -
eonyron webforumsuser@macromedia.com #2
Re: Adding text to dynamic text field
Interesting issue!
I don't understand the reason you declare the function to do all this but I figure you have your reasons. In doing that you are pulling the text without the "quotes" that read back as spaces instead of %20.
Mabey declare variables within the text like:
line1=this and that&line2=this and that.
I may be off track here, I would like to see this problem solved. I hope this helps...
Good Luck!
eonyron webforumsuser@macromedia.com Guest
-
Volume4 webforumsuser@macromedia.com #3
Re: Adding text to dynamic text field
Thanks for your input, I resolved the issue. It was really just an issue of me not completely understanding the process of reading information into Flash that has been loaded using loadVars().
I have changed the code now to the following:
var content_lv = new LoadVars();
content_lv.onLoad = setContent;
content_lv.load("about_us.txt");
and set the content as follows:
function setContent() {
aboutus_txt.text = content_lv.aboutus;
// The only real change being calling content_lv.aboutus instead of just content_lv
// .aboutus being the name from which you want to extract the value in the external text file's
// name=value pairs.
}
Hope this can help someone else out and save them some time.
Schalk
Volume4 webforumsuser@macromedia.com Guest



Reply With Quote

