passing paramters to component in flex
- by dubbeat
Hi,
I've got 2 files, my Application and a custom component.
In my component I have a httpservice and a string named _requestUrl that is bindable. The httpservice uses this.
<mx:HTTPService id="srv"
url="{_requestUrl}"
result="parseHttpResult(event)"
resultFormat="xml"
method="GET"
useProxy="false">
</mx:HTTPService>
In my application file I make an instance of my component in the onCreationComplete function.
In this function if I say
mycomponent._urlRequest ="http://mysite.com" the httpservice throws a null url error but if I say mycomponent.srv.url="http://mysite.com" it works fine.
Why is this?