Trying to simplify this:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute" > <mx:HTTPService id="temp" url="http://localhost:3000/signup/ register" result="resBack(event)" resultFormat="e4x" method="POST" />
        <mx:TextArea id="txt"  width="771" height="251"/>
        <mx:Button click="sendIt()" label="Click"  x="335" y="259"/>
        <mx:Script>
                <![CDATA[
                        public function sendIt():void{
                                temp.send({first_name: "first name"});
                        }
                        
                        private function resBack(event:Event):void{
                                txt.text = String(temp.lastResult);
                        }
                ]]>
        </mx:Script>
</mx:Application>



But when I click the button, I get:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at test/sendIt()
        at test/___Button1_click()
        at [mouseEvent]

Reply via email to