When using mxml httpservice
<mx:HTTPService id="hsNutrition" url="/main.php/flexnutrition/nutritioncal"
fault="nutritionFaultHandler(event)" resultFormat="e4x"/>
I call the init on app load
private function init():void
{
hsNutrition.addEventListener(ResultEvent.RESULT,
nutritionResultHandler);
hsNutrition.send();
}
private function nutritionResultHandler(event:ResultEvent):void
{
nutritionData = event.result as XML;
Alert.show("NUTRITION RESULT");
}
I then later resuse the httpservice another area but this code does not seem to
remove the nutritionResultHandler from the result, it actually calls both
result events on one http send?
Any ideas what might be happening?
hsNutrition.removeEventListener(ResultEvent.RESULT,
nutritionResultHandler);
hsNutrition.request.byo = "b";
hsNutrition.addEventListener(ResultEvent.RESULT, createYourOwnMeal_result);
hsNutrition.send();
}