Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / February 2005



Tip: Looking for answers? Try searching our database.

Problems displaying dataGrid in a loader of a second swf file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
theSnoMan - 26 Feb 2005 03:04 GMT
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.
JamesDad - 26 Feb 2005 03:21 GMT
What happens if you concatenate the two parts of the string first, then pass
the new value to the XMLConnector, like this:  var foo =
_global.phpFolder+_global.phpListFile; this.myReceiveXMLConnector.URL = foo;
this.myReceiveXMLConnector.URL.trigger();
theSnoMan - 26 Feb 2005 04:09 GMT
Thank you very much for the reply, unfortunately it seems to make no
differance.  I've also tried using it with and without globals, neither seems
to affect it.

Here is was works:
var phpListFile = "http://www.mysite.com/php/myXMLfile.php4?listType=All";

Sending it like this does not:
var combinedURL = myPhpPath + "/myXMLfile.php4?listType=All";
var phpListFile =  combinedURL ;

running a trace on the URL always comes out the same, no matter which way I do
it, but only the first method works.

I always get the correct number of rows of data, I just don't get any data.  
I'm almost positive that this is a problem with flash, maybe something is
corrupted, I don't know.  I did try reinstalling it but had no luck, so I
really don't know what's going on.
theSnoMan - 26 Feb 2005 04:39 GMT
OK, I feel like a real idiot now.  I worked on this all day and some how
managed to miss the fact I was sending 2 differant URL's.  Both link to similar
PHP scripts on my server and return similar data but contain differant
attributes.  When sending the incorrect URL I would see the correct number of
rows but of course the column Id's don't match, thus messing it all up.  I made
the changes and now it works great. Looks like another case of a short between
the chair and the keyboard...lol.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.