Select to view content in your preferred language

Import Text File widget

833
3
07-05-2011 10:39 AM
dcopple
Frequent Contributor
I have a text file that can be downloaded from an online database with lat/lon coordinates.  I can import directly into ArcGIS explored from the online link.  I would like to do the same in FLEX.  Any ideas, or widgets out there that will do that?
Tags (2)
0 Kudos
3 Replies
YungKaiChin
Regular Contributor
It is quite simple.
The general process is:

1. Create an URLLoader when the app
2. add eventlistener (event.complete)
3. load(new URLRequest(URL))
4. when completed, assign the URLLoader.data to a label/textArea/whateve.text
0 Kudos
dcopple
Frequent Contributor
Any direction further on this would be great, where do I put the code (widget sml?, config file).  I am building my app using a text ediitor, not adobe.  So not sure where to put this code.  Sorry if it is a dumb question, I am sure like you say it is simple, just don't know where to add the lines of code to make it happen.

I am using Agisviewer for Flex for my development, so this may need to go into a different forum, but not sure how to move it.

thanks
0 Kudos
YungKaiChin
Regular Contributor
You may need the flash builder or an editor that can compile.

(Assuming your editor can do that) you can write a function inside. <fx:Script></fx:Script>
Here is an example that may help:
http://www.kirupa.com/forum/showthread.php?223798-ActionScript-3-Tip-of-the-Day&p=1910480#post191048...
0 Kudos