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?
EDIT:
<mx:Script>
import mx.events.FlexEvent;
import components.custom
private var comp:custom= new custom()
private var comp:custom= new custom()
public function setVars(event:FlexEvent):void
{
comp._requestUrl="http://site.com"
comp.setVars(event)
pform.addChild(comp)
}
//creationComplete="setVars(event)"
</mx:Script>