all groups > flash data integration > april 2007 >
You're in the

flash data integration

group:

Reference data brought in via XMLConnctor


Reference data brought in via XMLConnctor Lon
4/20/2007 12:14:03 PM
flash data integration:
Hi there.

Using an exteral XML file, and the XML connector, I am able to bind the data
to a text area component with no problem.

However, I would like to grab some of these values and use them for other
things in actionscript. How do I actually reference that value or string
(that does display in the text area) in actionscript?

Re: Reference data brought in via XMLConnctor Lon
4/20/2007 1:03:32 PM
Thank you for the fast response.

I see how this is done when using the XML object in AS - however, the data
is being brought in via the component. I just don't know what syntax to use
to reference the data via the component.

I've added a listener and with a trace, can see the XML, but can't even
reference that.

[quoted text, click to view]

Re: Reference data brought in via XMLConnctor Lon
4/20/2007 2:06:16 PM
What have you tried so far? Maybe we can find the solution - I think it's
mostly a sytax issue.

I am simply loading a single record from an XML file with only 3 data
fields. Like a mentioned, I am able to bind these fields to text areas
components.

I've also added this: (where myConn is the connector instance name)

var res = function (ev) {
trace(ev.target.results);

};
myConn.addEventListener("result", res);

--

The trace returns the entire contents of the XML file, as it should.

I have a dyamiic textbox (instance name tbFname) on the stage, and poplate
it with:

tbVar = ?????
tbFname.text = tbVar;

I've tried various ways to populate the textbox, starting with the most
obvioux - myConn.results.people.fname (similar to the binding path).

I may just go back to using loadVariables, etc....


[quoted text, click to view]

Re: Reference data brought in via XMLConnctor The Feldkircher
4/20/2007 4:48:31 PM
Hi

Re: Reference data brought in via XMLConnctor JoMama4U
4/20/2007 5:14:20 PM
I'm having the same issue as Lon... It's really frustrating that I'm having
difficulty referencing the data within the component system! i have values
within the DataSet that I'd like to do things do...so how do I make that
reference?

There are countless examples posted where you can grab the data from a
selection in the DataGrid, etc. But I'd like to (for example) dynamically
spawn CheckBox components with labels based on XMLConnector data. How would I
go about referencing that in AS?

Thanks!
AddThis Social Bookmark Button