It seems that your project is Flex web project.
The WindowedApplication
is included in the AIR SDK, meaning your project needs to be desktop application project.
Try,
<s:WindowedApplication>
to<s:Application>
Added:
Although the URLLoader is very important class, you may want to use HTTPService in general.
Let's take a look at code that does the same as your code above:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="service.send()">
<fx:Declarations>
<s:HTTPService id="service" resultFormat="e4x" url="books.xml"/>
</fx:Declarations>
<s:VGroup>
<s:TextArea id="txtArea" width="100%" text="{service.lastResult}"/>
</s:VGroup>
</s:Application>
Isn't it simple?
URLLoader is as3 class, and the Flex framework is built on as3. HTTPService is the Flex component, which provides you easy and convenient features. It uses URLLoader internally.