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 / October 2005



Tip: Looking for answers? Try searching our database.

xml driven CDrom?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ewyglend - 25 Oct 2005 15:43 GMT
I am working on a CDrom (built in flash)  that has easily outdatable content.
Instead of offering weblinks for all of the text content, I'd like to have the
CDrom call up xml from a web location that can be updated. The problem I am
running into is this: what happens when someone doesn't have an internet
connection or the server is down? I'd like to have a backup XML document on the
CDrom that is called up if the web XML document cannot be found. I tried
googling this and looking at other forums, but I couldn't find any documention
on anyone else attempting this.  I am nothing near an ActionScript expert, so
any suggestions would be helpful.
Thanks in advance,
Liz
* - 25 Oct 2005 23:13 GMT
>I am working on a CDrom (built in flash)  that has easily outdatable content.
>Instead of offering weblinks for all of the text content, I'd like to have the
[quoted text clipped - 7 lines]
> Thanks in advance,
> Liz

var x:XML = new XML();

x.onLoad = function(bSuccess:Boolean):Void
{
    if (bSuccess) {
        // Success, load data from server
    } else {
        // Failure, load data from CD
    }
};

// Swap out this URL with your own...
x.load("http://localhost/locations.xml");
Chrononaut - 29 Oct 2005 00:32 GMT
I just did this; here's what I did:

myXML = new XML();
myXML.onLoad = function (success) {
  if (success) {
    // you're good
  } else {
    // load from local source... myXML.load("local filename")
  }
}
myXML.load("remote filename");

Hope that helps.
ewyglend - 29 Oct 2005 18:12 GMT
Thanks, that seems to be exactly what I was looking for.
 
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.