flash data integration:
Hi Everyone,
I've got a problem that?s driving me crazy. I've built an application
with a preloader, knowing that I cannot use any class that has to be exported
to the 1st frame, and I have in fact set export to frame 5. What I am trying
to do is load a second file containing my dataGrid, XML connector, and
dataBinding classes through the Loader component (using the Data Connection
Wizard). To pass the needed URL to the second movie I am using a combination
of 2 global variables, 1 for the php folder location and 1 for the actual file
used to retrieve the dynamic XML file.
Results:
If I run it and assign the URL to the XML connecter like the below 2 examples
it works fine.
in the child swf
this.myReceiveXMLConnector.URL =
"
http://www.mysite.com/php/myXMLfile.php4?listType=All"; this.myReceiveXMLConnector.URL.trigger();
stop();
OR
in the parent swf:
_global.phpListFile =
"
http://www.mysite.com/php/myXMLfile.php4?listType=All"; and in the child swf:
this.myReceiveXMLConnector.URL = _global.phpListFile;
this.myReceiveXMLConnector.URL.trigger();
stop();
If I try to build the URL dynamically and pass it through a global
variable like below, it no longer shows the data in the dataGrid that is
loaded, though the rows show up telling me that something has arrived. I have
tried passing different variables to this and I always get the correct number
of rows in the dataGrid, there is just no text displayed.
on parent swf:
_global.phpFolder = "
http://www.mysite.com/php/"; _global.phpListFile = "myXMLfile.php4?listType=All";
on child swf, frame 1:
this.myReceiveXMLConnector.URL =
_global.phpFolder+_global.phpListFile;
this.myReceiveXMLConnector.URL.trigger();
trace(this.myReceiveXMLConnector.URL); //this always shows the
correct URL with variables as expected
trace(myDataGrid.selectedItem.columnId); //this displays undefined
as if there is no data
stop();
Running a trace on the URL always returns the correct URL with the correct
variables. Running a trace on the selectedItem.columnId always yields an
"undefined" result.
Basically I know this, my XML output is fine and is loadable. The child
swf when given a normal URL works fine, but when piecing the URL together with
variables no longer displays any data.
What really gets me is I just did this same exact thing less then a week
ago with no problems what so ever. I have reviewed my previous file and gone
over it with a fine tooth comb only to find nothing different. Is there a
possibility of corruption in Flash that is causing this? I?m willing to pass
these files onto anyone who might be willing to take a closer look at it. I
have spent over a day on this one thing and I feel like I have no way to turn.
I hope I have made this clear enough for someone to help me, I'm at my wits end
with Flash about now and I would sure appreciate any help someone could give.