# Getting runtime output from a Class

**URL:** https://forum.kirupa.com/t/getting-runtime-output-from-a-class/236014
**Category:** flash
**Created:** [August 16, 2007, 2:29pm UTC](https://forum.kirupa.com/t/getting-runtime-output-from-a-class/236014 "2007-08-16T14:29:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AndreasCS](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@AndreasCS](https://forum.kirupa.com/u/AndreasCS)
#### Post date: [August 16, 2007, 2:29pm UTC](https://forum.kirupa.com/t/getting-runtime-output-from-a-class/236014/1 "2007-08-16T14:29:33Z")

</div>

I’m very new to the AS2-\>AS3 transition, just found out sendAndLoad no longer exists in its easy glory. So I found this template;

```auto
package {

    import flash.events.*;
    import flash.net.*;
    import flash.text.*;

    public class SendAndLoadExample {
        public function SendAndLoadExample() {}
        public function sendData(url:String, _vars:URLVariables):void {
            var request:URLRequest = new URLRequest(url);
            var loader:URLLoader = new URLLoader();
            loader.dataFormat = URLLoaderDataFormat.VARIABLES;
            request.data = _vars;
            request.method = URLRequestMethod.POST;
            loader.addEventListener(Event.COMPLETE, handleComplete);
            loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
            loader.load(request);
        }
        private function handleComplete(event:Event):void {
            var loader:URLLoader = URLLoader(event.target);
            trace("Par: " + loader.data.par);
            trace("Message: " + loader.data.msg);
        }
        public function onIOError(event:IOErrorEvent):void {
            trace("Error loading URL.");
        }
    }
}

```

The thing is I cannot load the php-file from the internet to my local swf, thus not being able to see any trace results ☹

I tried to make a TextArea component on the Stage and send the results there, but can’t find a method to do so (MovieClip(root).something didn’t work).

What would be the best way to view the results without using trace?
