flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kessler CTR Mark J <mark.kessler....@usmc.mil>
Subject RE: Load External File
Date Thu, 29 Sep 2016 10:08:20 GMT
You can use FileReference[1] to load a file.  Browse for the file, load it.  Once the complete
event is dispatched you should be able to use the "data" property to access the file data.

If you need to you can convert the ByteArray to string just by casting it.

[1] http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html


-----Original Message-----
From: Lane [mailto:lanefriesen@hotmail.com]
Sent: Thursday, September 29, 2016 4:23 AM
To: users@flex.apache.org
Subject: [Non-DoD Source] Load External File

I'm wanting to load an external file, as in:

var myTextLoader:URLLoader = new URLLoader();

myTextLoader.addEventListener(Event.COMPLETE, onComplete);
myTextLoader.load(new URLRequest("myFile.html"));

It appears that there is no 'load' option yet activated under URLLoader on
FlexJS. Is there a way to do this, other than using URLLoader and then load?



This email has been checked for viruses by Avast antivirus software.

View raw message