This content has been marked as final. Show 11 replies
as2 or as3?
you can do it with XML... or you could do it with name/value pairs as a traditional LoadVars or with plain text.
If you want to do it with plain text, there is an example here:
Thanks for this GWD, I'll give it a try!
Hi GWD. This worked perfectly! Thanks!
Just one question though? I'd like to have each section of text (Testimonials) appear in a different location on the screen - how would I change the code to do this?
Your help is greatly appreciated.
Do you want the locations configured from the external text file, or fixed (or automatically calculated) from code?
e.g.: configured in the text file: (x,y postion... could put width and height here too if required)
The regular content is here.
I think configured via the flash file.
Couple of quick questions... For the Textfields:
a)Do you have the textfields already on stage (in other words your "5 or so" comment in your first post is fixed to the number of textfields you put on stage). If so, what the names of the textfields and in what scope (e.g. main timeline or inside a clip called "textHolder" etc.
b)Or do you want them created dynamically by code? If they are to be created dynamically by code, are they to be placed in fixed (scattered) locations or is there a pattern - e.g. are evenly spaced? If the positions are fixed and do not fall into pattern... then what are they (in sequence) or if they are in a layout pattern please describe it.
In answer to your questions:
a) The textfields will already be on stage and contained within the main timeline. It's a kind of phone directory appliation so the text fields are static for each entry.
b) Quick answer – no!
OK.... well if the text file only contains a single representation of the content for the five textfields and its only ever going to be like that, then you just need to loop through an array of references to those textfields in the same order that the entries appear in the text file.
e.g. for the testimonial example (untested, but I think it should work).
Thanks GWD. That works a treat! You have saved me a whole lot of stress.
Thanks again for your efforts!
No problems... you're welcome.