Replies Back to Article

Free! - Configure your Flash application using XML

RE: idMap
January 27, 2006 by Peter Elst
you're right Kees, its actually a little issue with the XML.idMap property on the default install of Flash 8. I've made a blog post about it here: http://www.peterelst.com/blog/2005/12/19/flash-8-settimeout-and-xmlidmap/ Forgot to mention it in the article, but will update as soon as possible. The easiest way to fix this is to use the following code: var tmp = configXML["idMap"][param]; Hope this helps! Peter
RE: RE: idMap
January 27, 2006 by kees muijt

Still the same, I tried your suggestion, and your website suggestion for the xml.as file, after that i started F8 again, but still the same, i tried everything, but no luck.....any suggestion?

 

Kees

 

RE: RE: RE: idMap
January 27, 2006 by Peter Elst
ah I see the problem, there's a typo in the article text -- the source files have the correct syntax. I'll email you a fixed version of your code. Basically the XML instance should be defined outside the loadConfig function so that it is available for getConfigParam to use. Thanks for letting me know about that problem! Peter
RE: RE: RE: RE: idMap
January 27, 2006 by kees muijt

OK, hope it works now hahaaa....

Kees

RE: Please Post Proper Code
January 27, 2006 by Peter Elst
Hi Mel, an update to the article is on its way -- if you download the accompanying source files you'll have the correct syntax to work with. Thanks!
RE: Please Post Proper Code
January 27, 2006 by Mel Roth

Sorry, I reread the comments and see that you posted a fix, setting getConfigParam to this stops the errors:

getConfigParam = function(param:String) {
  var tmp = configXML["idMap"][param];
  if(tmp == undefined) {
    tmp = this[param];
  } else {
  tmp = tmp.attributes["value"];
 }
  return tmp;
}