I have been trying unsuccessfully to set a HTTP break in my Flex 3 project. Obviously, I am totally clueless about programming and I don't have many references. When I try to export the project I receive parse errors for the result handler and var fault string. I am attaching a code snippet of where I have been placing the break.
<mx:HTTPService id="getData" url="http://www.myurl.com"
useProxy="false" method="GET" resultFormat="text" resultType="text"
result="resultHandler(event)" fault="faultHandler(event)">
private function resultHandler(e:ResultEvent):void {
trace(e.result);
}
private function resultHandler(e:FaultEvent):void {
var faultstring:String = event.fault.faultString;
Alert.show(faultstring);
}
<mx:request xmlns="">
<getTutorials>"true"</getTutorials>
</mx:request>
I think this may have to do with the PHP file and the type of data the Flex is looking for? Here is the first bit of the error I am receiving in the browser.
TypeError: Error #1034: Type Coercion failed: cannot convert "[{"id":"2","name":"Strapless Wedding Dress Tips","author":"Ramona Waters","rating":"0"},{"id":"3","name":"Coordinating Your Brides Maids","author":"Ericka Brown","rating":"0"}]" to mx.controls.Alert. at DressBuilder2/resultHandler() at DressBuilder2/__getData_result() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent()