all groups > flash actionscript > february 2004 >
You're in the

flash actionscript

group:

load external txt and "transform" it to links


Re: load external txt and "transform" it to links Mari-Anne Ennor
2/23/2004 2:12:23 PM
flash actionscript:
Hi there,

I took an AS class from http://www.lvsonline.com once wherein we learned
this exact topic.

1. Create a dynamic text field and give it a variable name, e.g. text0

2. Then create a text file to be stored in the same directory as your
..fla file (named url.txt, for example), laid out as follows - replace
with mailto links as necessary:

url=<a href="http://www.macromedia.com"
target="_blank">Macromedia</a>,<a href="http://www.google.com"
target="_blank">Ask Google</a>

3. Finally, create an array which will be populated by the links
defined in your text file:

//Build Array from Variable Text File
xUrl = new Array();
xUrl = url.split(",");
//Set HTML properties for Dynamic Text and load the related Array
//element to the Dynamic Text box
link0.html=true;
link0=xUrl[0];
link1.html=true;
link1=xUrl[1];

etc. etc.

If that doesn't make sense, let me know and I'll send you an example fla.

Mari-Anne in Montana
load external txt and "transform" it to links Pluda
2/23/2004 7:08:33 PM
Hello there,

I'm loading an external txt file whith emails on it, but I need them to be linkable.
Is that possible?
How?

Thanks

Re: load external txt and "transform" it to links Pluda
2/23/2004 11:49:00 PM
AddThis Social Bookmark Button