You are mixing assignment and binding unwisely, I think.

"Application.application.scroller.dataProvider=Application.application.m
ainthumbXMLsrv.lastResult;" Does not create a binding, and lastResult
does not contain the new data yet.

 

Don't try to bind directly to last result.  Cerate an instance level
variable for the dataProvider, and bind to that.  Then in a result
handler function, assign XML(event.result) to that instance variable.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of shawn.gibson
Sent: Sunday, April 08, 2007 3:16 PM
To: [email protected]
Subject: [flexcoders] simple I hope for once - replace HTTPService
content with new content

 

Well for once I have a simple question poeple might be willing to help
to answer:)

I have been able to get HTTPService to load gal_red.xml into my
scroller component, and now I can APPEND the gal_blue.xml file from
clicking a button, but I am hoping to REPLACE the gal_red.xml with the
gal_blue.xml file. Here is my attempt at replacing the red with the
blue (loadBlue() is called as a click on the button):

import mx.core.Application

private function loadBlue():void {
Application.application.mainthumbXMLsrv.showBusyCursor=true;
Application.application.mainthumbXMLsrv.cancel();
Application.application.mainthumbXMLsrv.url="model/gal_blue.xml";
Application.application.scroller.dataProvider=Application.application.ma
inthumbXMLsrv.lastResult;
Application.application.mainthumbXMLsrv.send();
}

...as I say, it's appending images into the scroller after the red,
not replacing it with the blue. 

For reference:

http://74.121.128.139:8500/dataflow/bin/dataflow.html
<http://74.121.128.139:8500/dataflow/bin/dataflow.html> 

...click 'blue.jpg' in the upper left...

Any help would be appreciated. I had to remove the E4X formatting to
make this work, but I guess it's one step at a time.

Shawn

 

Reply via email to