neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

9/7/2006

Flash 8 XML Class Bug: There is no property with the name ‘idMap’.

Filed under: General — geoff @ 5:57 pm

I’ve been racking my brain trying to use the old XML id attribute shortcut to quickly access XMLNodes.  I couldn’t get it to work consistently when publishing to Flash Players 6, 7, or 8.  In Flash 7, it seems that only uppercase node IDs work.  In Flash 8, you need to use the idMap array to access your nodes directly.  This works fine on its own, but if you try it in a class with an XML object in it, you’ll get this error:

There is no property with the name 'idMap'.

I did a little digging and found this blog that posted this solution:

Editer le fichier intrinsic de la classe XML ([login]\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Classes\FP8) et y ajouter var idMap:Array. Ce qui reste dangereux si votre code source doit pouvoir être compilé sur une autre machine.

The rought translation is that you need to edit your intrinsic Flash classes in your Flash IDE’s classpath.  A pain, expecially if you need to share your code with others.  You’ll need to edit the XML.as file and add:

var idMap:Array;

I hope this saves someone from frustration.

 

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

2 Comments »

  1. This goes for the XML idMap and setTimeout functionality in Flash 8. What I usually advise people to do is use array notation to escape from the compiler errors, that way you don’t require anyone else you share your code with to have changed the intrinsic classes:

    myXML["idMap"]
    _global["setTimeout"]()

    More information here as well: http://www.peterelst.com/blog/2005/12/19/flash-8-settimeout-and-xmlidmap

    HTH!

    Comment by Peter Elst — 9/7/2006 @ 7:29 pm

  2. Why would you use Macromedia’s wack XML classes when you could use indivisions XMLConstruct. Not only does it work as DOM parser, you can pass Macromedia’s XML objects it it. Voila XML as it is supposed to be.

    http://svn.indivision.net/codebase/classes/net/indivision/data/

    Comment by drew — 9/7/2006 @ 7:39 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

 

Powered by WordPress