-
Error 1046 URLLoader
i have this code in my main program at the begining
and it produces the errors below but it works in isolation what can the problem be?
code
var myTextLoader:URLLoader = new URLLoader ();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
trace(e.target.data);
}
myTextLoader.load(new URLRequest("mytxt.txt"));
Errors
1046: Type was not found or was not a compile-time constant: URLLoader.
1180: Call to a possibly undefined method URLLoader.
1180: Call to a possibly undefined method URLRequest.
thnaks andrew
-
You need to import flash.net.URLLoader and flash.net.URLRequest
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|